public bool?ShowDialog() { FontChooserDialog fontChooser = new FontChooserDialog(); fontChooser.SelectedFontFamily = new System.Windows.Media.FontFamily(SelectedFontFamily); fontChooser.SelectedFontSize = SelectedFontSize; fontChooser.SelectedFontColor = ColorHelper.ToWpfColor(SelectedFontColor); fontChooser.ShowTextDecorations = false; fontChooser.Owner = App.Current.GetActiveWindow(); var result = fontChooser.ShowDialog(); if (result == true) { SelectedFontFamily = fontChooser.SelectedFontFamily.Source; SelectedFontSize = fontChooser.SelectedFontSize; SelectedFontColor = ColorHelper.FromWpfColor(fontChooser.SelectedFontColor); } return(result); }
public static System.Drawing.Color ToGdi(this Rendering.Color color) { return(System.Drawing.Color.FromArgb(color.A, color.R, color.G, color.B)); }
public static Color ToWpfColor(Rendering.Color color) { return(Color.FromArgb(color.A, color.R, color.G, color.B)); }