views:

20

answers:

0

If I have code like this:

FormattedText text = new FormattedText(sTheBook,
      System.Globalization.CultureInfo.CurrentUICulture,
      System.Windows.FlowDirection.LeftToRight, 
      new Typeface("Times New Roman"), 
      13, Brushes.Black);

text.MaxTextWidth = 300;
text.MaxTextHeight = 600;
text.TextAlignment = TextAlignment.Justify;
dc.DrawText(text, new Point(10, 0));

...then, if it is long, only some of the text that I passed in (via sTheBook) will be displayed on the screen. I need to know how much was displayed so I can display the rest later! I can easily measure an amount of text, but it seems silly to do a search by rendering and re-rendering my text over and over until I find the piece that fits exactly.

I'd be open to using some other WPF text rendering technique if it has this functionality.

Thanks!