Skip to main content

RibbonBarItem

Namespace: Wisej.Web.Ext.RibbonBar

Assembly: Wisej.Web.Ext.RibbonBar (4.1.0.0)

Represents a single item in a RibbonBarGroup.

public abstract class RibbonBarItem : Component

This is the abstract base class of all the ribbon items: RibbonBarItemButton, RibbonBarItemSplitButton, RibbonBarItemButtonGroup, RibbonBarItemCheckBox, RibbonBarItemRadioButton, RibbonBarItemTextBox, RibbonBarItemComboBox, RibbonBarItemControl and RibbonBarItemSeparator. Items are arranged vertically in columns inside the group, see ColumnBreak.

Properties​

Instance member ColumnBreak​

Boolean: Returns or sets a value indicating whether a new column starts after this RibbonBarItem.

Value: true if the next item in the RibbonBarGroup is placed in a new column; otherwise, false. The default is false.

The items in a RibbonBarGroup are stacked vertically in a column; a new column is started after an item that has ColumnBreak set to true. Large (vertical) buttons and controls and separators always occupy a column of their own.

Example:

Stacking three small buttons in a column followed by a second column:

var group = new RibbonBarGroup { Text = "Font" };
group.Items.Add(new RibbonBarItemButton { Text = "Bold", Orientation = Orientation.Horizontal });
group.Items.Add(new RibbonBarItemButton { Text = "Italic", Orientation = Orientation.Horizontal });
group.Items.Add(new RibbonBarItemButton { Text = "Underline", Orientation = Orientation.Horizontal, ColumnBreak = true });
group.Items.Add(new RibbonBarItemCheckBox { Text = "Superscript" });
group.Items.Add(new RibbonBarItemCheckBox { Text = "Subscript" });

Instance member Enabled​

Boolean: Returns or sets whether the RibbonBarItem can respond to user interaction. (Default: True)

Value: true if the item can respond to user interaction; otherwise, false. The default is true.

Instance member Image​

Image: Returns or sets the image that is displayed next to a RibbonBarItem.

Value: The Image displayed next to the RibbonBarItem. The default value is null.

Instance member ImageIndex​

Int32: Returns or sets the index value of the image assigned to the RibbonBarItem. (Default: -1)

Value: The index value of the Image assigned to the RibbonBarItem. The default is -1.

The index refers to an image in the ImageList of the RibbonBar that contains this item.

Throws:

Instance member ImageKey​

String: Returns or sets the name of the image assigned to the RibbonBarItem. (Default: "")

Value: The name of the Image assigned to the RibbonBarItem.

The key refers to an image in the ImageList of the RibbonBar that contains this item.

Instance member ImageSource​

String: Returns or sets the theme name or URL for the image to display next to a RibbonBarItem.

Value: The theme name or URL for the image to display next to the RibbonBarItem.

Example:

Using a theme icon or a URL as the image of an item:

this.buttonSave.ImageSource = "icon-save";
this.buttonExport.ImageSource = "Images/export.png";

Instance member Name​

String: Returns or sets the name of the RibbonBarItem.

Value: The name of the RibbonBarItem.

The name can be used to retrieve the item from the Items collection (case insensitive) and to identify the item in the ItemClick event. At design time it's the name of the component in the designer.

Instance member Parent​

RibbonBarGroup: Returns the RibbonBarGroup that owns this RibbonBarItem.

Instance member RibbonBar​

RibbonBar: Returns the RibbonBar that contains this RibbonBarItem.

Returns null until the item is added to a RibbonBarGroup that belongs to a RibbonBarPage in a RibbonBar. The events of an item that is not connected to a RibbonBar are not fired.

Instance member Tag​

Object: Returns or sets the object that contains data about the control. (Default: null)

Value: An object that contains user-defined data about the control. The default is null.

Instance member Text​

String: Returns or sets the text of the RibbonBarItem. (Default: "")

Value: The text displayed in the RibbonBarItem.

Instance member ToolTipText​

String: Returns or sets the tooltip text for the RibbonBarItem. (Default: "")

Value: The text displayed in a tooltip for the RibbonBarItem.

Instance member Visible​

Boolean: Returns or sets whether the RibbonBarItem is visible or hidden. (Default: True)

Value: true if the item is visible; otherwise, false. The default is true.

A hidden item doesn't take any space in the RibbonBarGroup layout.

Methods​

Protected member Dispose(disposing)​

Disposes of the resources (other than memory) used by the RibbonBarGroup.

ParameterTypeDescription
disposingBooleantrue when this method is called by the application rather than a finalizer.

Protected member OnWebRender(config)​

Renders the client component.

ParameterTypeDescription
configObjectDynamic configuration object.

Instance member Update()​

Updates the component on the client.

Changing the properties of the item already updates the client. At design time the entire RibbonBar is updated.

Example:

Forcing the item to be updated on the client:

this.buttonSave.Update();

Protected member ValidateActiveControl()​

Validates the current control.

Returns: Boolean. true if the active control is validated.

Events​

Instance member Click​

EventHandler Fired when the RibbonBarItem is clicked.

Inherited By​

NameDescription
RibbonBarItemButtonRepresents a button in a RibbonBarGroup.
RibbonBarItemButtonGroupRepresents a group of buttons in a RibbonBarGroup organized horizontally.
RibbonBarItemCheckBoxRepresents a checkbox in a RibbonBarGroup.
RibbonBarItemComboBoxRepresents a combobox in a RibbonBarGroup.
RibbonBarItemControlRepresents a user defined control in a RibbonBarGroup.
RibbonBarItemRadioButtonRepresents a radio button in a RibbonBarGroup.
RibbonBarItemSeparatorRepresents a vertical separator in a RibbonBarGroup.
RibbonBarItemSplitButtonRepresents a split button in a RibbonBarGroup.
RibbonBarItemTextBoxRepresents a textbox in a RibbonBarGroup.

Implements​