ClassRadCommandBar
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
RadCommandBar()
Initializes a new instance of the RadCommandBar class.
Declaration
public RadCommandBar()
Fields
OrientationChangedEventKey
The key for the OrientationChanged event.
Declaration
public static readonly object OrientationChangedEventKey
Field Value
OrientationChangingEventKey
The key for the OrientationChanging event.
Declaration
public static readonly object OrientationChangingEventKey
Field Value
Properties
AutoSize
Gets or sets a value indicating whether the control automatically resizes to fit its contents.
Declaration
public override bool AutoSize { get; set; }
Property Value
true if the control automatically resizes to fit its contents; otherwise, false.
Overrides
BackColor
RadCommandBar consists of multiple visual elements and separate settings are provided to customize their appearance. Current BackColor property might be ignored.
Declaration
public override Color BackColor { get; set; }
Property Value
Overrides
CommandBarElement
Gets or sets the RadCommandBarElement of the RadCommandBar control.
Declaration
[Browsable(false)]
public RadCommandBarElement CommandBarElement { get; set; }
Property Value
CustomizeContextMenu
Gets the menu opened upon rightclick on the control.
Declaration
public RadDropDownMenu CustomizeContextMenu { get; }
Property Value
DefaultSize
Declaration
protected override Size DefaultSize { get; }
Property Value
Overrides
Dock
Gets or sets which RadCommandBar borders are docked to its parent control and determines how a control is resized with its parent.
Declaration
public override DockStyle Dock { get; set; }
Property Value
Exceptions
The value assigned is not one of the DockStyle values.
Overrides
DragSize
Gets or sets the size in pixels when current strip is being Drag and Drop in next or previous row.
Orientation
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.
Declaration
[Browsable(false)]
public Orientation Orientation { get; set; }
Property Value
Rows
Gets the rows of the commandbar.
Declaration
[RadNewItem("", false, true, true)]
[RadEditItemsAction]
[Browsable(true)]
public RadCommandBarLinesElementCollection Rows { get; }
Property Value
Methods
ControlDefinesThemeForElement(RadElement)
Checks whether the element's theme is defined by the control.
Declaration
public override bool ControlDefinesThemeForElement(RadElement element)
Parameters
element
The element to should be checked.
Returns
true if the control defines theme for this element, false otherwise.
Overrides
Remarks
If true is returned the ThemeResolutionService would not not set any theme to the element to avoid duplicating the style settings of the element.
CreateAccessibilityInstance()
Creates an accessibility instance for the command bar control.
Declaration
protected override AccessibleObject CreateAccessibilityInstance()
Returns
A RadCommandBarAccessibleObject if accessibility is enabled; otherwise, the base accessibility object.
Overrides
CreateChildItems(RadElement)
Creates and initializes the child items of the command bar, including the main command bar element and context menu.
Declaration
protected override void CreateChildItems(RadElement parent)
Parameters
parent
The parent RadElement to which child elements will be added.
Overrides
CreateCommandBarElement()
Creates the command bar element for the RadCommandBar.
Declaration
protected virtual RadCommandBarElement CreateCommandBarElement()
Returns
A new instance of RadCommandBarElement.
CreateRootElement()
Creates the root element for the RadCommandBar.
Declaration
protected override RootRadElement CreateRootElement()
Returns
A new instance of RadCommandBar.RadCommandBarRootElement.
Overrides
OnLoad(Size)
Notifies that the control is about to be visualized.
Declaration
protected override void OnLoad(Size desiredSize)
Parameters
desiredSize
Overrides
OnMouseDown(MouseEventArgs)
Declaration
protected override void OnMouseDown(MouseEventArgs e)
Parameters
e
Overrides
OnOrientationChanged(EventArgs)
Raises the event.
OnOrientationChanging(CancelEventArgs)
Raises the event.
Declaration
protected virtual bool OnOrientationChanging(CancelEventArgs args)
Parameters
args
A CancelEventArgs that contains the event data.
Returns
True if the change of orientation should be canceled, false otherwise.
OnParentChanged(EventArgs)
Declaration
protected override void OnParentChanged(EventArgs e)
Parameters
e
Overrides
OnThemeChanged()
Declaration
protected override void OnThemeChanged()
Overrides
ProcessAutoSizeChanged(bool)
Declaration
protected override void ProcessAutoSizeChanged(bool value)
Parameters
value
Overrides
ProcessCodedUIMessage(ref IPCMessage)
Declaration
protected override void ProcessCodedUIMessage(ref IPCMessage request)
Parameters
request
IPCMessage
Overrides
ResetBackColorThemeOverrides()
Declaration
protected override void ResetBackColorThemeOverrides()
Overrides
ResetForeColorThemeOverrides()
Declaration
protected override void ResetForeColorThemeOverrides()
Overrides
SetBackColorThemeOverrides()
Declaration
protected override void SetBackColorThemeOverrides()
Overrides
SetForeColorThemeOverrides()
Declaration
protected override void SetForeColorThemeOverrides()
Overrides
SetOrientationCore(Orientation, bool)
Applies the orientation to the control and its child elements.
Declaration
protected virtual void SetOrientationCore(Orientation value, bool fireEvents)
Parameters
value
The orientation to apply
fireEvents
Indicates whether events should be fired
SetThemeCore()
Propagate ThemeName to child bar's menu
Declaration
protected virtual void SetThemeCore()
Events
FloatingStripCreated
Occurs when a floating strip is created.
Declaration
public event EventHandler FloatingStripCreated
Event Value
FloatingStripCreating
Occurs before a floating form is created.
Declaration
public event CancelEventHandler FloatingStripCreating
Event Value
FloatingStripDocked
Occurs when a floating strip is docked.
Declaration
public event EventHandler FloatingStripDocked
Event Value
FloatingStripDocking
Occurs before a floating strip is docked.
Declaration
public event CancelEventHandler FloatingStripDocking
Event Value
OrientationChanged
Occurs after the orientation is changed.
OrientationChanging
Occurs before the orientation is changed.
Declaration
public event CancelEventHandler OrientationChanging
Event Value