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 : System.Windows.Forms.Control, System.ComponentModel.INotifyPropertyChanged
Public Class RibbonButton
  Inherits System.Windows.Forms.Control
  Implements System.ComponentModel.INotifyPropertyChanged

Introduced: X14.

Examples

The following example shows a RibbonButton class with its two properties. The Description property sets the description text "My RibbonButton" that will appear on this button when the DisplayMode property is set to LargeIconLabeled.

TXTextControl.Windows.Forms.Ribbon.RibbonButton ribbonButton =
new TXTextControl.Windows.Forms.Ribbon.RibbonButton();

    ribbonButton.Description = "My RibbonButton";
    ribbonButton.DisplayMode =     
    TXTextControl.Windows.Forms.Ribbon.IconTextRelation.LargeIconLabeled;
Dim ribbonButton As TXTextControl.Windows.Forms.Ribbon.RibbonButton = 
New TXTextControl.Windows.Forms.Ribbon.RibbonButton()

    ribbonButton.Description = "My RibbonButton"
    ribbonButton.DisplayMode =   
    TXTextControl.Windows.Forms.Ribbon.IconTextRelation.LargeIconLabeled

Constructors

Constructor Description
RibbonButton Initializes a new instance of the RibbonButton class.

Properties

Property Description
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.
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.
KeyTip Gets or sets the keyboard shortcut of the RibbonButton.
LargeIcon Gets or sets a 32x32 1/96 inch icon for this RibbonButton.
ParentCollection Gets the RibbonItemCollection that contains this RibbonButton.
SmallIcon Gets or sets a 16x16 1/96 inch icon for this RibbonButton.
Text Overridden.
ToolTip Gets an object of type RibbonToolTip that displays text when the mouse pointer hovers over the item.

Further Reading

Learn more about the TXTextControl.Windows.Forms.Ribbon.RibbonButton Class in the Text Control Blog: