Get the 'actual font' being used for a WPF element
- by mackenir
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?