RibbonFontControl - harborsiem/WinForms-Ribbon GitHub Wiki
RibbonFontControl
In the markup file this control is called FontControl
Public constructors, methods, properties and events:
Constructors:
Name | Description |
---|---|
RibbonFontControl(RibbonStrip, uint) | Initializes a new instance of the RibbonFontControl class. |
Methods:
Properties:
Name | Description |
---|---|
CommandId | Get the Id; set by constructor. |
CommandType | Get the CommandType. Before this control is in view by the UI, the CommandType is Unknown. After this control is first time in UI view the CommandType is Font. |
Enabled | Get, Set the enabled state. |
Name | Get, Set an optional Name. |
Ribbon | Get the RibbonStrip (set by constructor). |
ResourceIds | Get class MarkupResIds. This class delivers all markup resource ids for a Command. Only available if RibbonStrip.Markupheader is set. |
Keytip | Get, Set a Keytip string. See Note below. |
Tag | Get, Set an optional Tag. |
Family | Get, Set The selected font family name. |
Size | Get, Set The size of the font. |
Bold | Get, Set Flag that indicates whether bold is selected. |
Italic | Get, Set Flag that indicates whether italic is selected. |
Underline | Get, Set Flag that indicates whether underline is selected. |
Strikethrough | Get, Set Flag that indicates whether strikethrough is selected (sometimes called Strikeout). |
ForegroundColor | Get, Set 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. |
BackgroundColor | Get, Set 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 to and from COLORREF structure. |
VerticalPositioning | Get, Set Flag that indicates which one of the Subscript and Superscript buttons are selected, if any. |
FontStyle | Get This property is a .NET FontStyle and handled Bold, Italic, Underline and Strikethrough. |
Events:
Name | Description |
---|---|
FontChanged | User can handle changed font. EventArgs are FontControlEventArgs. |
Preview | User can handle changed selected item. EventArgs are FontControlEventArgs. |
CancelPreview | User can handle changed selected item. EventArgs are FontControlEventArgs. |
CreateUICommand | Control is created by the Ribbon Framework |
DestroyUICommand | Control is destroyed by the Ribbon Framework |
!Note:
For properties Keytip, LableTitle, LabelDescription, TooltipTitle and TooltipDescription: If listed property value is only set by Markup resource you get a value of null (nothing). But if you set RibbonStrip property MarkupHeader to the 'Embedded Resource' RibbonMarkup.h file, you will get the correct string.