Beispiel #1
0
 public static FontInfo GetFontInfo(this OutlineTextBlock control)
 {
     return(new FontInfo(
                control.FontFamily,
                control.FontSize,
                control.FontStyle,
                control.FontWeight,
                control.FontStretch));
 }
Beispiel #2
0
 public static void SetFontInfo(this OutlineTextBlock control, FontInfo fontInfo)
 {
     if (control.GetFontInfo().ToString() != fontInfo.ToString())
     {
         control.FontFamily  = fontInfo.Family;
         control.FontSize    = fontInfo.Size;
         control.FontStyle   = fontInfo.Style;
         control.FontWeight  = fontInfo.Weight;
         control.FontStretch = fontInfo.Stretch;
     }
 }