Example #1
0
 public bool SetSelectedFontByString(string name)
 {
     foreach (var item in Items)
     {
         FontFamily font = (item as StackPanel).Tag as FontFamily;
         LanguageSpecificStringDictionary fontDic = font.FamilyNames;
         if (fontDic.Any(p => p.Value == name))
         {
             SelectedItem = item;
             return(true);
         }
     }
     SelectedItem = -1;
     return(false);
 }