RibbonButton Class
- Namespace
TXTextControl.Windows. Forms. Ribbon
- Package
TXTextControl.from the private NuGet feed or Text Control Offline PackagesTextControl. WinForms. SDK
- Assembly
TXTextControl.Windows. Forms. dll
- Install
dotnet add package TXTextControl..NET 8 and later. For .NET Framework, referenceTextControl. WinForms. SDK TXTextControl.from the setup.Windows. Forms. dll
- Inherits
- Control
- Ribbon
Button
- Derived
- Ribbon
Menu , RibbonButton Toggle Button
- Implements
- INotify
Property Changed
Description
The RibbonButton class is a button control which can be added to a RibbonGroup or to a RibbonMenuButton where it is stored as an item of the drop-down menu. Furthermore it is the base class of the RibbonToggleButton and RibbonMenuButton classes. The RibbonButton class is inherited from the System.Windows.Forms.Control class and implements the System.ComponentModel.INotifyPropertyChanged interface. The following describes only the properties, methods and events defined through the RibbonButton class. For a list of properties, methods and events inherited from the System.Windows.Forms.Control class and the System.ComponentModel.INotifyPropertyChanged interface see the .NET Framework reference.
Syntax
public class RibbonButton : Control, INotifyPropertyChangedPublic Class RibbonButton
Inherits Control
Implements INotifyPropertyChangedExamples
The following example creates a Ribbon Button instance and configures its description setting for a document workflow.
using TXTextControl.Windows.Forms.Ribbon.RibbonButton ribbonButton = new();
ribbonButton.Description = "Quarterly report";Dim ribbonButton As New TXTextControl.Windows.Forms.Ribbon.RibbonButton()
ribbonButton.Description = "Quarterly report"Members
Constructors
| Constructor | Description |
|---|---|
| RibbonButton | Initializes a new instance of the RibbonButton class. |
Properties
| Property | Description |
|---|---|
| DefaultBackColor | Not described in the reference. public Color DefaultBackColor { get; } |
| Description | Gets or sets the description text that appears on this button in a RibbonMenuButton's drop down menu when the DisplayMode property of the button is set to IconTextRelation.LargeIconLabeled. |
| DisplayMode | Sets the RibbonButton's superordinate display settings and gets its corresponding text icon relation rendering to the current group's width. |
| Enabled | Not described in the reference. public bool Enabled { get; set; } |
| IsAddToQuickAccessToolbarEnabled | Gets or sets a value indicating whether the RibbonButton can be added to the quick access toolbar. |
| IsScalable | Gets or sets value indicating whether the RibbonButton changes its display mode when the related ribbon group is scaled by resizing the application. The default value is true. |
| KeyTip | Gets or sets the keyboard shortcut of the RibbonButton. |
| LargeIcon | Gets or sets a 32x32 1/96 inch icon for this RibbonButton. This icon is shown when the DisplayMode property is set to IconTextRelation.LargeIconLabeled. The default value is IconTextRelation.LargeIconLabeled. |
| ParentCollection | Gets the RibbonItemCollection that contains this RibbonButton. |
| SmallIcon | Gets or sets a 16x16 1/96 inch icon for this RibbonButton. This icon is shown when the DisplayMode property is set to IconTextRelation.SmallIconLabeled or IconTextRelation.SmallIconUnlabeled. |
| Text | Overridden. Gets or sets the RibbonButton's text. |
| ToolTip | Gets an object of type RibbonToolTip that displays text when the mouse pointer hovers over the item. |
| Visible | Not described in the reference. public bool Visible { get; set; } |
Events
| Event | Description |
|---|---|
| PropertyChanged | Not described in the reference. public event PropertyChangedEventHandler PropertyChanged; |