Get text properties from Flow Document
H开发者_C百科ow can we get text
properties like bold
, italic
, text alignment
, etc. from a Flow Document
(in a RichTextBox
control)? Can we get these properties in a single TextRange
or string
?
Found it. Simpler than I thought.
My solution is to go word by word (or Textpointer) and get the TextRange.GetPropertyValue.
TextElement and Inline Dependency Property has everything I need. FontWeight, FontStyle, BaseAalignment, etc, I just had to play a little bit with my code until I got what I needed
Hope it helps someone :-)
精彩评论