private void CmbFontFamily_OnSelectionChanged(object sender, SelectionChangedEventArgs e) { var font = (sender as ComboBox).SelectedItem as InstalledFont; var fontList = InstalledFont.GetFonts(); var items = font.GetCharacters(); gridView.ItemsSource = items; }
private void FilterFontList(bool isSymbolFontsOnly) { var fontList = InstalledFont.GetFonts(); var newList = fontList.Where(f => f.IsSymbolFont || !isSymbolFontsOnly) .OrderBy(f => f.Name) .ToObservableCollection(); FontList = newList; }
private void CmbFontFamily_OnSelectionChanged(object sender, SelectionChangedEventArgs e) { if (gridView.Visibility == Visibility.Collapsed) { gridView.Visibility = Visibility.Visible; placeholder.Visibility = Visibility.Collapsed; } var font = (sender as ComboBox).SelectedItem as InstalledFont; var fontList = InstalledFont.GetFonts(); var items = font.GetCharacters(); gridView.ItemsSource = items; }
private void InitializeList() { var fontList = InstalledFont.GetFonts(); CmbFontFamily.ItemsSource = fontList; }
public MainViewModel() { var fontList = InstalledFont.GetFonts(); FontList = fontList.OrderBy(f => f.Name).ToObservableCollection(); }