Skip to main content

RibbonBarItemControl

Namespace: Wisej.Web.Ext.RibbonBar

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

Represents a user defined control in a RibbonBarGroup.

public class RibbonBarItemControl : 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​

Instance member RibbonBarItemControl()​

Initializes a new instance of RibbonBarItemControl.

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.

Always returns true when Orientation is Vertical. The value set is used only when Orientation is Horizontal.

Instance member 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:

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

Instance member 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​

Protected member Dispose(disposing)​

Disposes the page and related resources.

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

Protected member OnAddReferences(items)​

Adds references components to the list. Referenced components can be added individually or as a reference to a collection.

ParameterTypeDescription
itemsIListContainer for the referenced components or collections.

Protected member OnWebEvent(e)​

Processes the event from the client.

ParameterTypeDescription
eWisejEventArgsEvent arguments.

Protected member OnWebRender(config)​

Renders the client component.

ParameterTypeDescription
configObjectDynamic configuration object.

Implements​