public static void ApplyFont(Control control, FontInfo font) { control.FontFamily = font.Family; control.FontSize = font.Size; control.FontStyle = font.Style; control.FontStretch = font.Stretch; control.FontWeight = font.Weight; control.Foreground = font.BrushColor; }
public static FontInfo GetControlFont(Control control) { FontInfo font = new FontInfo(); font.Family = control.FontFamily; font.Size = control.FontSize; font.Style = control.FontStyle; font.Stretch = control.FontStretch; font.Weight = control.FontWeight; font.BrushColor = (SolidColorBrush)control.Foreground; return font; }
public ColorFontDialog() { Log.Debug("Loading ColorFontDialog"); this.selectedFont = null; // Default InitializeComponent(); }
private void btnOk_Click(object sender, RoutedEventArgs e) { this.Font = this.colorFontChooser.SelectedFont; this.DialogResult = true; }
public ColorFontDialog() { this.selectedFont = null; // Default InitializeComponent(); }