Get the 'actual font' being used for a WPF element

Posted by mackenir on Stack Overflow See other posts from Stack Overflow or by mackenir
Published on 2010-03-22T13:05:37Z Indexed on 2010/03/22 13:11 UTC
Read the original article Hit count: 1086

Filed under:
|

WPF lets you specify the FontFamily of TextBlocks, Buttons, etc. Is there a way to discover what font WPF decided to use for a given element? For example, if you leave the FontFamily unspecified, styles notwithstanding, an element will take on the Font Family 'GlobalUserInterface'. In this case, can I determine programmatically what font is actually being used to render an element's text?

© Stack Overflow or respective owner

Related posts about wpf

Related posts about font-family