Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get Available Fonts in WPF

Tags:

wpf

fonts

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?

like image 526
jmayor Avatar asked Jul 17 '09 13:07

jmayor


1 Answers

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"/>
like image 141
Darius Avatar answered Nov 09 '22 09:11

Darius