RibbonBarPage
Namespace: Wisej.Web.Ext.RibbonBar
Assembly: Wisej.Web.Ext.RibbonBar (4.1.0.0)
Represents a page in a RibbonBar control.
- C#
- VB.NET
public class RibbonBarPage : Component
Public Class RibbonBarPage
Inherits Component
Each page is displayed as a tab in the RibbonBar and contains the RibbonBarGroup panels in its Groups collection.
Constructors
RibbonBarPage()
Initializes a new instance of RibbonBarPage.
Properties
Enabled
Boolean: Returns or sets whether the items in the RibbonBarPage can respond to user interaction. (Default: True)
Value: true if the page and its items can respond to user interaction; otherwise, false. The default is true.
Groups
RibbonBarGroupCollection: Returns the RibbonBarGroup collection in the RibbonBarPage.
The groups are displayed from left to right in the order they appear in the collection.
Example:
Adding a group with a few items to a page:
var group = new RibbonBarGroup { Name = "paragraph", Text = "Paragraph" };
group.Items.Add(new RibbonBarItemButton { Name = "alignLeft", Text = "Left", Orientation = Orientation.Horizontal });
group.Items.Add(new RibbonBarItemButton { Name = "alignCenter", Text = "Center", Orientation = Orientation.Horizontal });
group.Items.Add(new RibbonBarItemButton { Name = "alignRight", Text = "Right", Orientation = Orientation.Horizontal });
this.ribbonBarPage1.Groups.Add(group);
Name
String: Returns or sets the name of the RibbonBarPage.
Value: The name of the RibbonBarPage. The default is an empty string ("").
The name can be used to retrieve the page from the Pages collection (case insensitive). At design time it's the name of the component in the designer.
Parent
RibbonBar: Returns the RibbonBar that owns this RibbonBarPage.
RibbonBar
RibbonBar: Returns the RibbonBar that contains this RibbonBarPage.
Selected
Boolean: Returns or sets whether the RibbonBarPage is the currently selected page (SelectedPage).
Value: true if this page is the selected page; otherwise, false.
Assigning any value selects this page; setting it to false doesn't deselect it. Select another page instead. The value is ignored when the page doesn't belong to a RibbonBar.
Example:
Selecting a page:
this.ribbonBarPageView.Selected = true;
TabBackColor
Color: Returns or sets the background color of the RibbonBarPage tab button. (Default: Color [Empty])
Value: The background Color of the tab button. The default is Empty, which uses the color defined in the theme.
TabForeColor
Color: Returns or sets the text color of the RibbonBarPage tab button. (Default: Color [Empty])
Value: The text Color of the tab button. The default is Empty, which uses the color defined in the theme.
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 RibbonBarPage. (Default: "")
Value: The text displayed in the button that corresponds to this page.
When UseMnemonic is true, the character following an ampersand (&) is underlined and used as the mnemonic key that selects the page. Use two ampersands (&&) to display a single ampersand.
UseMnemonic
Boolean: Returns or sets whether the first character that is preceded by an ampersand (&) is used as the mnemonic key to select this RibbonBarPage. (Default: True)
Value: true if the first character that is preceded by an ampersand (&) is used as the mnemonic key; otherwise, false. The default is true.
When true, the mnemonic character in Text is underlined and pressing the mnemonic key selects the page, unless the page is disabled or hidden. When false, the ampersand is displayed as a regular character.
Example:
Selecting the "Home" page using the H mnemonic key:
this.ribbonBarPage1.Text = "&Home";
this.ribbonBarPage1.UseMnemonic = true;
// displays "R&D" without a mnemonic.
this.ribbonBarPage2.Text = "R&D";
this.ribbonBarPage2.UseMnemonic = false;
Visible
Boolean: Returns or sets whether the RibbonBarPage is visible or hidden. (Default: True)
Value: true if the tab of the page is visible; otherwise, false. The default is true.
Hiding a page hides its tab button; it doesn't change the SelectedPage. Select a different page when hiding the page that is currently selected.
Methods
Dispose(disposing)
Disposes of the resources (other than memory) used by the RibbonBarPage.
| 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 |
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 page already updates the client. At design time the entire RibbonBar is updated.
Example:
Forcing the page to be updated on the client:
this.ribbonBarPage1.Update();
Implements
| Name | Description |
|---|---|
| IUserData | |
| IWisejComponent | |
| IWisejSerializable |