开发者

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 :-)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜