开发者

Get text properties from Flow Document

开发者 https://www.devze.com 2023-03-31 05:40 出处:网络
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

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

精彩评论

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