Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Problem with ApplyPropertyValue Method

$
0
0

I have encountered a strange problem with the ApplyPropertyValue method of the TextRange object. The following code segment works fine for a small amount of text in the WPF RichTextBox rtb, but hangs indefinitely when the RichTextBox contains a larger number of text:

TextRange r = new TextRange(rtb.Document.ContentStart, rtb.Document.ContentEnd);

r.ApplyProperyValue(TextElement.ForegroundProperty, new SolidColorBrush(Colors.Lightgreen));

Any ideas?


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>