I have a WPF Combobox that is binding to
Me.fontComboFast.ItemsSource = Fonts.SystemFontFamilies
<ComboBox x:Name="fontComboFast">
<ComboBox.ItemsPanel>
<ItemsPanelTemplate>
<VirtualizingStackPanel />
</ItemsPanelTemplate>
</ComboBox.ItemsPanel>
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding}" FontFamily="{Binding}" FontSize="15" Height="20"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
The following exception occurs. How would be the best way to clear the Fonts.SystemFontFamilies of any invalid fonts?
'file:///C:/Program Files (x86)/Common Files/Adobe/SING/AssocCache/Generic.otf' file does not conform to the expected file format specification.