Class DropDownBarItem
A BarItem derived class that will drop down a PopupControlContainer when the user clicks on it.
Implements
Inherited Members
Namespace: Syncfusion.Windows.Forms.Tools.XPMenus
Assembly: Syncfusion.Tools.Windows.dll
Syntax
public class DropDownBarItem : BarItemEx, IChangeNotifyingItem, ICustomTypeDescriptor, IDataBindingSupport, ICloneable, IParentBarItem, ISerializable, IIgnoreWorkingArea
Remarks
This BarItem derived class allows you to show custom drop-downs from submenus, context menus and tool bars. Use the PopupControlContainer property to associate this item with a PopupControlContainer.
You can use this to display for example a Color picker drop-down (by placing a ColorUIControl in a derived PopupControlContainer.
Constructors
DropDownBarItem()
Overloaded. Initializes a new instance of the DropDownBarItem class with default settings.
Declaration
public DropDownBarItem()
DropDownBarItem(SerializationInfo, StreamingContext)
Declaration
protected DropDownBarItem(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
System.Runtime.Serialization.SerializationInfo | info | |
System.Runtime.Serialization.StreamingContext | context |
DropDownBarItem(String)
Initializes a new instance of the DropDownBarItem class and sets its caption.
Declaration
public DropDownBarItem(string text)
Parameters
Type | Name | Description |
---|---|---|
System.String | text | The DropDownBarItem's caption. |
DropDownBarItem(String, EventHandler)
Initializes a new instance of the DropDownBarItem class, sets its caption and event handler for the Click event of the DropDownBarItem.
Declaration
public DropDownBarItem(string text, EventHandler onClick)
Parameters
Type | Name | Description |
---|---|---|
System.String | text | The DropDownBarItem's caption. |
System.EventHandler | onClick | The event handler for the ItemClick event. |
DropDownBarItem(String, EventHandler, Shortcut)
Initializes a new instance of the DropDownBarItem class, sets its caption, event handler for the Click event and the Shortcut for this item.
Declaration
public DropDownBarItem(string text, EventHandler onClick, Shortcut shortcut)
Parameters
Type | Name | Description |
---|---|---|
System.String | text | The DropDownBarItem's caption. |
System.EventHandler | onClick | The event handler for the ItemClick event. |
System.Windows.Forms.Shortcut | shortcut | The Shortcut for this item. |
DropDownBarItem(MenuMerge, Int32, Shortcut, String, EventHandler, EventHandler, EventHandler)
Initializes a new instance of the DropDownBarItem class, sets its merge type, merge order, shortcut, caption, event handler for ItemClick, event handler for Popup and the event handler for Selected.
Declaration
public DropDownBarItem(MenuMerge mergeType, int mergeOrder, Shortcut shortcut, string text, EventHandler onClick, EventHandler onPopup, EventHandler onSelect)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.MenuMerge | mergeType | The item's System.Windows.Forms.MenuMerge |
System.Int32 | mergeOrder | The item's merge order. |
System.Windows.Forms.Shortcut | shortcut | The item's Shortcut. |
System.String | text | The item's caption. |
System.EventHandler | onClick | The handler for the ItemClick event. |
System.EventHandler | onPopup | The handler for the Popup event. |
System.EventHandler | onSelect | The handler for the Select event. |
Properties
IgnoreWorkingArea
Declaration
public bool IgnoreWorkingArea { get; set; }
Property Value
Type |
---|
System.Boolean |
ParentStyle
Gets or sets the ParentStyle in which the menu will be drawn.
Declaration
public virtual ParentBarItemStyle ParentStyle { get; set; }
Property Value
Type |
---|
ParentBarItemStyle |
Remarks
A ParentBarItemStyle value indicating the ParentStyle in which the menu will be drawn. The default value is ParentBarItemStyle.DropDown.
Take a look at the documentation for the ParentBarItemStyle enumeration for more information on the interpretation of each ParentBarItemStyle value.
Changing this property's value will throw the PropertyChanged event.
PopupControlContainer
Gets or sets the PopupControlContainer that will be dropped down from this item when placed in a menu or toolbar.
Declaration
public PopupControlContainer PopupControlContainer { get; set; }
Property Value
Type |
---|
PopupControlContainer |
Remarks
A PopupControlContainer that represents the popup control associated with this Item.
This item will popup the specified PopupControlContainer when the user clicks on the drop-down portion of the bar item.
Changing this property's value will throw the PropertyChanged event.
The set PopupControlContainer will be disposed when this DropDownBarItem is disposed.
Methods
Clone()
Creates a clone of this DropDownBarItem instance.
Declaration
public override object Clone()
Returns
Type | Description |
---|---|
System.Object | An object that has similar properties to this DropDownBarItem. |
Overrides
Remarks
Creates a new instance of DropDownBarItem and calls the CopyTo(BarItem) method to copy over properties. It does not copy over the PopupControlContainer property value.
Dispose(Boolean)
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |
Overrides
GetObjectData(SerializationInfo, StreamingContext)
Declaration
public override void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
System.Runtime.Serialization.SerializationInfo | info | |
System.Runtime.Serialization.StreamingContext | context |
Overrides
Explicit Interface Implementations
ICloneable.Clone()
Declaration
object ICloneable.Clone()
Returns
Type |
---|
System.Object |