RibbonBarGroup
Namespace: Wisej.Web.Ext.RibbonBar
Assembly: Wisej.Web.Ext.RibbonBar (4.1.0.0)
Represents a group of RibbonBarItem in a RibbonBarPage.
- C#
- VB.NET
public class RibbonBarGroup : Component
Public Class RibbonBarGroup
Inherits Component
The group displays its Items in vertical columns (see ColumnBreak) above the title set in Text. When ShowButton is true, a small button is displayed next to the title; clicking it fires the Click event and the GroupClick event.
Constructors
RibbonBarGroup()
Initializes a new instance of RibbonBarGroup.
Properties
Enabled
Boolean: Returns or sets whether the items in the RibbonBarGroup can respond to user interaction. (Default: True)
Value: true if the group and its items can respond to user interaction; otherwise, false. The default is true.
Disabling the group disables all its child items on the client, including the group button, without changing the Enabled property of the items.
Items
RibbonBarItemCollection: Returns the collection of RibbonBarItem children.
Adding an item to the collection sets its Parent to this group. The items are stacked vertically in columns in the order they appear in the collection; see ColumnBreak.
Example:
Adding a large button, a separator and a column of small items:
var group = this.ribbonBarGroup1;
group.Items.Add(new RibbonBarItemButton { Name = "find", Text = "Find", ImageSource = "icon-search" });
group.Items.Add(new RibbonBarItemSeparator());
group.Items.Add(new RibbonBarItemCheckBox { Name = "matchCase", Text = "Match case" });
group.Items.Add(new RibbonBarItemCheckBox { Name = "wholeWord", Text = "Whole word" });
group.Items.Add(new RibbonBarItemTextBox { Name = "searchText", Text = "Find:" });
Name
String: Returns or sets the name of the RibbonBarGroup.
Value: The name of the RibbonBarGroup. The default is an empty string ("").
The name can be used to retrieve the group from the Groups collection (case insensitive). At design time it's the name of the component in the designer.
Parent
RibbonBarPage: Returns the RibbonBarPage that owns this RibbonBarGroup.
RibbonBar
RibbonBar: Returns the RibbonBar that contains this RibbonBarGroup.
Returns null until the group is added to a RibbonBarPage that belongs to a RibbonBar.
ShowButton
Boolean: Returns or sets whether the RibbonBarGroup shows the expand button next to the group's title. (Default: False)
Value: true to show the button next to the title; otherwise, false. The default is false.
Clicking the button fires the Click event on the group and the GroupClick event on the RibbonBar. It's typically used to open a dialog with additional options.
Example:
Opening a dialog with more options when the group button is clicked:
this.ribbonBarGroupFont.ShowButton = true;
this.ribbonBarGroupFont.Click += (s, e) =>
{
new FontOptionsDialog().ShowDialog();
};
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.
Text
String: Returns or sets the title of the RibbonBarGroup. (Default: "")
Value: The text displayed at the bottom of the group.
The title is hidden when the text is empty.
Visible
Boolean: Returns or sets whether the RibbonBarGroup is visible or hidden. (Default: True)
Value: true if the group is visible; otherwise, false. The default is true.
A hidden group doesn't take any space in the RibbonBarPage.
Methods
Dispose(disposing)
Disposes of the resources (other than memory) used by the RibbonBarGroup.
| Parameter | Type | Description |
|---|---|---|
| disposing | Boolean | true when this method is called by the application rather than a finalizer. |
OnAddReferences(items)
Returns a collection of referenced components or collection of components.
| Parameter | Type | Description |
|---|---|---|
| items | IList |
OnClick(e)
Fires the Click event.
OnWebEvent(e)
Processes the event from the client.
| Parameter | Type | Description |
|---|---|---|
| e | WisejEventArgs | Event arguments. |
OnWebRender(config)
Renders the client component.
| Parameter | Type | Description |
|---|---|---|
| config | Object | Dynamic configuration object. |
Update()
Updates the component on the client.
Changing the properties of the group already updates the client. At design time the entire RibbonBar is updated.
Example:
Forcing the group to be updated on the client:
this.ribbonBarGroup1.Update();
Events
Click
EventHandler Fired when the user clicks the RibbonBarGroup button next to the label.
Implements
| Name | Description |
|---|---|
| IUserData | |
| IWisejComponent | |
| IWisejSerializable |