コード例 #1
0
        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;
        }
コード例 #2
0
        private void FilterFontList(bool isSymbolFontsOnly)
        {
            var fontList = InstalledFont.GetFonts();

            var newList = fontList.Where(f => f.IsSymbolFont || !isSymbolFontsOnly)
                          .OrderBy(f => f.Name)
                          .ToObservableCollection();

            FontList = newList;
        }
コード例 #3
0
        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;
        }
コード例 #4
0
        private void InitializeList()
        {
            var fontList = InstalledFont.GetFonts();

            CmbFontFamily.ItemsSource = fontList;
        }
コード例 #5
0
        public MainViewModel()
        {
            var fontList = InstalledFont.GetFonts();

            FontList = fontList.OrderBy(f => f.Name).ToObservableCollection();
        }