RibbonBarItemControl
Namespace: Wisej.Web.Ext.RibbonBar
Assembly: Wisej.Web.Ext.RibbonBar (4.1.0.0)
Represents a user defined control in a RibbonBarGroup.
- C#
- VB.NET
public class RibbonBarItemControl : RibbonBarItem
Public Class RibbonBarItemControl
Inherits RibbonBarItem
The hosted Control fills the item and is resized together with it. The Text and image properties of the item are not displayed.
Constructors
RibbonBarItemControl()
Initializes a new instance of RibbonBarItemControl.
Properties
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.
Always returns true when Orientation is Vertical. The value set is used only when Orientation is Horizontal.
Control
Control: Returns or sets the Control to be hosted inside the RibbonBarItemControl. (Default: null)
Value: The hosted Control, or null. The default is null.
The control is moved into the RibbonBar that contains this item, its AutoSize property is set to false and its size follows the size of the item on the client. Assign the control after the item has been added to a RibbonBarGroup that is already part of a RibbonBar, otherwise the control has no parent.
When a different control is assigned, the previous control is moved to the parent of the RibbonBar. When the hosted control is disposed, this property is reset to null; when the item is disposed, the hosted control is disposed as well.
Throws:
- ArgumentException The value is the RibbonBar that contains this item.
Example:
Hosting a DateTimePicker in a ribbon group:
var item = new RibbonBarItemControl { Orientation = Orientation.Horizontal };
this.ribbonBarGroupFilter.Items.Add(item);
item.Control = new DateTimePicker
{
Width = 140,
Format = DateTimePickerFormat.Short
};
Orientation
Orientation: Returns or sets the layout orientation of the RibbonBarItemControl. (Default: Vertical)
Value: One of the Orientation values. The default is Vertical.
Vertical makes the item fill the height of the group in a column of its own. Horizontal uses the height of the hosted control and stacks the item with the other small items in the same column until an item has ColumnBreak set to true.
Methods
Dispose(disposing)
Disposes the page and related resources.
| Parameter | Type | Description |
|---|---|---|
| disposing | Boolean | true when this method is called by the application rather than a finalizer. |
OnAddReferences(items)
Adds references components to the list. Referenced components can be added individually or as a reference to a collection.
| Parameter | Type | Description |
|---|---|---|
| items | IList | Container for the referenced components or collections. |
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. |
Implements
| Name | Description |
|---|---|
| IUserData | |
| IWisejComponent | |
| IWisejSerializable |