RadCommandBar
Represents a RadCommandBar control - a flexible component for implementation of tool and button bars featuring docking behavior, toggling buttons, shrinkable toolbars. The RadCommandBar is responsible for managing RadCommandBarBaseItem which are positioned on some of the CommandBarStripElement ///
Only items that inherit the RadCommandBarBaseItem class can be placed inside the strip elements. You can use the special CommandBarHostItem to host any other RadElement.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
[TelerikToolboxCategory("Menus & Toolbars")]
[Docking(DockingBehavior.Ask)]
public class RadCommandBar : RadControl, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IAnalyticsProvider
Inheritance: objectMarshalByRefObjectComponentControlScrollableControlRadControlRadCommandBar...
Derived Classes:
Implements:
Inherited Members
Constructors
Initializes a new instance of the RadCommandBar class.
public RadCommandBar()
Fields
The key for the OrientationChanged event.
public static readonly object OrientationChangedEventKey
The key for the OrientationChanging event.
public static readonly object OrientationChangingEventKey
Properties
Gets or sets a value indicating whether the control automatically resizes to fit its contents.
public override bool AutoSize { get; set; }
true if the control automatically resizes to fit its contents; otherwise, false.
Overrides:
RadCommandBar consists of multiple visual elements and separate settings are provided to customize their appearance. Current BackColor property might be ignored.
public override Color BackColor { get; set; }
Overrides:
Gets or sets the RadCommandBarElement of the RadCommandBar control.
[Browsable(false)]
public RadCommandBarElement CommandBarElement { get; set; }
Gets the menu opened upon rightclick on the control.
public RadDropDownMenu CustomizeContextMenu { get; }
protected override Size DefaultSize { get; }
Overrides:
Gets or sets which RadCommandBar borders are docked to its parent control and determines how a control is resized with its parent.
public override DockStyle Dock { get; set; }
The value assigned is not one of the DockStyle values.
Overrides:
Gets or sets the size in pixels when current strip is being Drag and Drop in next or previous row.
public Size DragSize { get; set; }
Gets or sets the orientation of the commandbar - could be horizontal or vertical. This property is controlled by the Dock property of the RadCommandBar control.
[Browsable(false)]
public Orientation Orientation { get; set; }
Gets the rows of the commandbar.
[RadNewItem("", false, true, true)]
[RadEditItemsAction]
[Browsable(true)]
public RadCommandBarLinesElementCollection Rows { get; }
Methods
Checks whether the element's theme is defined by the control.
public override bool ControlDefinesThemeForElement(RadElement element)
The element to should be checked.
Returns:true if the control defines theme for this element, false otherwise.
Overrides:
If true is returned the ThemeResolutionService would not not set any theme to the element to avoid duplicating the style settings of the element.
Creates an accessibility instance for the command bar control.
protected override AccessibleObject CreateAccessibilityInstance()
A RadCommandBarAccessibleObject if accessibility is enabled; otherwise, the base accessibility object.
Overrides:
Creates and initializes the child items of the command bar, including the main command bar element and context menu.
protected override void CreateChildItems(RadElement parent)
The parent RadElement to which child elements will be added.
Overrides:
Creates the command bar element for the RadCommandBar.
protected virtual RadCommandBarElement CreateCommandBarElement()
A new instance of RadCommandBarElement.
Creates the root element for the RadCommandBar.
protected override RootRadElement CreateRootElement()
A new instance of RadCommandBar.RadCommandBarRootElement.
Overrides:
Notifies that the control is about to be visualized.
Raises the event.
protected virtual bool OnOrientationChanging(CancelEventArgs args)
A CancelEventArgs that contains the event data.
Returns:True if the change of orientation should be canceled, false otherwise.
protected override void OnThemeChanged()
Overrides:
protected override void ProcessCodedUIMessage(ref IPCMessage request)
Overrides:
protected override void ResetBackColorThemeOverrides()
Overrides:
protected override void ResetForeColorThemeOverrides()
Overrides:
protected override void SetBackColorThemeOverrides()
Overrides:
protected override void SetForeColorThemeOverrides()
Overrides:
Applies the orientation to the control and its child elements.
protected virtual void SetOrientationCore(Orientation value, bool fireEvents)
The orientation to apply
fireEventsboolIndicates whether events should be fired
Propagate ThemeName to child bar's menu
protected virtual void SetThemeCore()
Events
Occurs when a floating strip is created.
public event EventHandler FloatingStripCreated
Occurs before a floating form is created.
public event CancelEventHandler FloatingStripCreating
Occurs when a floating strip is docked.
public event EventHandler FloatingStripDocked
Occurs before a floating strip is docked.
public event CancelEventHandler FloatingStripDocking
Occurs after the orientation is changed.
public event EventHandler OrientationChanged
Occurs before the orientation is changed.
public event CancelEventHandler OrientationChanging