public CustomStyle ToStyle() { return(new CustomStyle { Name = Name, Font = Font, UseDefaultFont = DefFont, Foreground = ColorEx.FromInt(Foreground), UseDefaultForeground = DefForeground, Background = ColorEx.FromInt(Background), UseDefaultBackground = DefBackground, Opacity = Opacity, UseDefaultOpacity = DefOpacity, Size = Size, UseDefaultSize = DefSize, Italic = Italic, UseDefaultItalic = DefItalic, Bold = Bold, UseDefaultBold = DefBold, Underline = Underline, UseDefaultUnderline = DefUnderline, Strikethrough = Strikethrough, UseDefaultStrikethrough = DefStrikethrough, }); }