FontPropertyStore - harborsiem/WinForms-Ribbon GitHub Wiki

FontPropertyStore

FontPropertyStore is a helper class for RibbonFontControl. Only Get properties supported.

Public constructors, methods, properties and events:

Constructors:

FontPropertyStore is created by FontControlEventArgs for the events FontChanged, Preview and CancelPreview. Property CurrentFontStore in FontControlEventArgs.

Methods:

Properties:

Name and (Type) Description
Family (string) The selected font family name.
Size (decimal) Size of the Font.
Bold (FontProperties) Flag that indicates whether bold is selected.
Italic (FontProperties) Flag that indicates whether italic is selected.
Underline (FontUnderline) Flag that indicates whether underline is selected.
Strikethrough (FontProperties) Flag that indicates whether strikethrough is selected (sometimes called Strikeout).
ForegroundColor (Color) Contains the text color if ForegroundColorType is set to RGB. The FontControl helper class expose this property as a .NET Color and handles internally the conversion to and from COLORREF structure.
ForegroundColorType (SwatchColorType) The text color type. Valid values are RGB and Automatic. If RGB is selected, the user should get the color from the ForegroundColor property. If Automatic is selected the user should use SystemColors.WindowText.
DeltaSize (FontDeltaSize?) Indicated whether the "Grow Font" or "Shrink Font" buttons were pressed. Can be null.
BackgroundColor (Color) Contains the background color if BackgroundColorType is set to RGB. The FontControl helper class expose this property as a .NET Color and handles internally the conversion from COLORREF structure.
BackgroundColorType (SwatchColorType) The background color type. Valid values are RGB and NoColor. If RGB is selected, the user should get the color from the BackgroundColor property. If NoColor is selected the user should use SystemColors.Window.
VerticalPositioning (FontVerticalPosition) Flag that indicates which one of the Subscript and Superscript buttons are selected, if any.

Events: