BarItem Class
Provides the functionality of bar elements.
Namespace: DevExpress.XtraBars
Assembly: DevExpress.XtraBars.v18.1.dll
Declaration
[SmartTagSupport(typeof(BarItemDesignTimeBoundsProvider), SmartTagSupportAttribute.SmartTagCreationMode.Auto)]
[SmartTagFilter(typeof(BarItemSmartTagFilter))]
public class BarItem :
Component,
IXtraSerializable,
ICustomTypeDescriptor,
IAppearanceOwner,
IBindableComponent,
IComponent,
IDisposable,
IDXImageUriClient,
ISupportAdornerElementBarItem,
IUpdateAdornerUI,
IDXMenuItemOwner
Related API Members
The following members accept/return BarItem objects:
Remarks
BarItem describes the functionality for any object located within a bar. Items are non-visual elements that contain methods and properties of the object within a bar and process specific object events. Item defines an object’s response to mouse clicks or key press events. Properties displayed within the Properties section of the Customization window are item properties.
A BarItem can be placed onto any existing bar or menu and based upon the item’s location, its behavior changes: in a bar, the item is a regular bar button, which can be clicked by a mouse or activated by a shortcut key combination. In a menu, the bar item is a specific menu command.
Note
If you create Bar Items in code, note that these objects may not function properly without being associated with a BarManager or RibbonControl. To create a Bar Item, use a Bar Item constructor that has the BarManager parameter. When creating a Bar Item in code for use within a RibbonControl, use a Bar Item constructor that has the BarManager parameter, and pass the RibbonControl.Manager object as this parameter.
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the BarItem class.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.