jmayor
jmayor

Reputation: 2795

How can I get Available Fonts in WPF

Using the System.Drawings System.Drawing.FontFamily.Families brings me up more families than the ones supported for WPF, or at least there is something wierd with some of the fonts that doesn't get rendered. Is there another way to get a Collection of all Fonts current available?

Upvotes: 8

Views: 9009

Answers (1)

Darius
Darius

Reputation: 524

Here you have a pure XAML-example:

http://blogs.msdn.com/text/archive/2006/06/20/592777.aspx

The key part is:

<CollectionViewSource Source="{Binding Source={x:Static Fonts.SystemFontFamilies}}" x:Key="familyCollection"/>

Upvotes: 19

Related Questions