TX Text Control .NET for Windows Forms

RibbonButton Class

Class|Introduced in 24.0
Namespace
TXTextControl.Windows.Forms.Ribbon
Package
TXTextControl.TextControl.WinForms.SDK from the private NuGet feed or Text Control Offline Packages
Assembly
TXTextControl.Windows.Forms.dll
Install
dotnet add package TXTextControl.TextControl.WinForms.SDK .NET 8 and later. For .NET Framework, reference TXTextControl.Windows.Forms.dll from the setup.
Inherits
  1. Control
  2. RibbonButton
Derived
RibbonMenuButton, RibbonToggleButton
Implements
INotifyPropertyChanged

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, INotifyPropertyChanged

Examples

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";

Members

Constructors

ConstructorDescription
RibbonButtonInitializes a new instance of the RibbonButton class.

Properties

PropertyDescription
DefaultBackColorNot described in the reference. public Color DefaultBackColor { get; }
DescriptionGets 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.
DisplayModeSets the RibbonButton's superordinate display settings and gets its corresponding text icon relation rendering to the current group's width.
EnabledNot described in the reference. public bool Enabled { get; set; }
IsAddToQuickAccessToolbarEnabledGets or sets a value indicating whether the RibbonButton can be added to the quick access toolbar.
IsScalableGets 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.
KeyTipGets or sets the keyboard shortcut of the RibbonButton.
LargeIconGets 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.
ParentCollectionGets the RibbonItemCollection that contains this RibbonButton.
SmallIconGets 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.
TextOverridden. Gets or sets the RibbonButton's text.
ToolTipGets an object of type RibbonToolTip that displays text when the mouse pointer hovers over the item.
VisibleNot described in the reference. public bool Visible { get; set; }

Events

EventDescription
PropertyChangedNot described in the reference. public event PropertyChangedEventHandler PropertyChanged;

Further Reading

  • Version X14: Customizing the Text Control Ribbon Control –