Class CommandBarStripElement
Represent a single strip with controls inside
Inheritance
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll
Syntax
public class CommandBarStripElement : RadCommandBarVisualElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IComponent, IDisposable, IBindableComponent, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider
Constructors
CommandBarStripElement()
Declaration
public CommandBarStripElement()
Fields
cachedDesiredLocation
Declaration
protected PointF cachedDesiredLocation
Field Value
|
System.Drawing.PointF
|
DesiredLocationProperty
VisibleInCommandBarProperty
Properties
Delta
Gets the delta of the drag.
Declaration
public PointF Delta { get; }
Property Value
|
System.Drawing.PointF
|
DesiredLocation
Gets or sets the desired location of the strip element.
Declaration
public PointF DesiredLocation { get; set; }
Property Value
|
System.Drawing.PointF
|
EnableDragging
Gets or sets if the strip can be dragged.
Declaration
public bool EnableDragging { get; set; }
Property Value
|
System.Boolean
|
EnableFloating
Gets or sets if the strip can be floating.
Declaration
public bool EnableFloating { get; set; }
Property Value
|
System.Boolean
|
FloatingForm
Gets the form in which the items are placed where the strip is floating.
Declaration
public CommandBarFloatingForm FloatingForm { get; set; }
Property Value
|
CommandBarFloatingForm
|
Grip
Gets or sets the RadCommandBarGrip element of the strip.
Declaration
public RadCommandBarGrip Grip { get; set; }
Property Value
|
RadCommandBarGrip
|
HasOverflowedItems
Gets whether the strip has items in its overflow panel.
Declaration
public bool HasOverflowedItems { get; }
Property Value
|
System.Boolean
|
IsDrag
Gets or sets whether the strip is beeing dragged.
Declaration
public bool IsDrag { get; }
Property Value
|
System.Boolean
|
Items
Gets the items contained in the strip.
Declaration
[RadEditItemsAction]
[RadNewItem("", false, false, false)]
public RadCommandBarBaseItemCollection Items { get; }
Property Value
|
RadCommandBarBaseItemCollection
|
ItemsLayout
Gets the layout panel in which the items are arranged.
Declaration
public RadCommandBarItemsPanel ItemsLayout { get; }
Property Value
|
RadCommandBarItemsPanel
|
MinSize
Declaration
public override Size MinSize { get; set; }
Property Value
|
System.Drawing.Size
|
Overrides
Orientation
Gets or sets the elements orientation inside the line element. Possible values are horizontal and vertical.
Declaration
[RadPropertyDefaultValue("Orientation", typeof(CommandBarRowElement))]
public override Orientation Orientation { get; set; }
Property Value
|
System.Windows.Forms.Orientation
|
Overrides
OverflowButton
Gets or sets the RadCommandBarOverflowButton element of the strip.
Declaration
public RadCommandBarOverflowButton OverflowButton { get; set; }
Property Value
|
RadCommandBarOverflowButton
|
OverflowMenuMaxSize
Gets or sets Overflow menu single strip maximum size.
Declaration
public Size OverflowMenuMaxSize { get; set; }
Property Value
|
System.Drawing.Size
|
OverflowMenuMinSize
Gets or sets Overflow menu single strip minimum size.
Declaration
public Size OverflowMenuMinSize { get; set; }
Property Value
|
System.Drawing.Size
|
Text
Declaration
public override string Text { get; set; }
Property Value
|
System.String
|
Overrides
VisibleInCommandBar
Gets or sets whether the strip is visible in the command bar. This property is changed by the context menu which is opened on right click on the control.
Declaration
public bool VisibleInCommandBar { get; set; }
Property Value
|
System.Boolean
|
Methods
ArrangeOverride(SizeF)
Declaration
protected override SizeF ArrangeOverride(SizeF finalSize)
Parameters
|
System.Drawing.SizeF
finalSize
|
Returns
|
System.Drawing.SizeF
|
Overrides
CanDragCore(Point)
Declaration
protected override bool CanDragCore(Point dragStartPoint)
Parameters
|
System.Drawing.Point
dragStartPoint
|
Returns
|
System.Boolean
|
Overrides
CreateChildElements()
Declaration
protected override void CreateChildElements()
Overrides
CreateCommandBarOverflowButton()
Declaration
protected virtual RadCommandBarOverflowButton CreateCommandBarOverflowButton()
Returns
|
RadCommandBarOverflowButton
|
DisposeManagedResources()
Declaration
protected override void DisposeManagedResources()
Overrides
ForceBeginDrag()
Declaration
protected void ForceBeginDrag()
ForceEndDrag()
Forces the drag to end.
Declaration
protected void ForceEndDrag()
GetDragHintCore()
Declaration
protected override Image GetDragHintCore()
Returns
|
System.Drawing.Image
|
Overrides
GetExpectedSize(SizeF)
Measures the items with the size given and calculates the expected size of the strip including the RadCommandBarGrip and RadCommandBarOverflowButton.
Declaration
public SizeF GetExpectedSize(SizeF availableSize)
Parameters
|
System.Drawing.SizeF
availableSize
The size to measure the items with. |
Returns
|
System.Drawing.SizeF
The calculated size of the strip. |
MeasureOverride(SizeF)
Declaration
protected override SizeF MeasureOverride(SizeF availableSize)
Parameters
|
System.Drawing.SizeF
availableSize
|
Returns
|
System.Drawing.SizeF
|
Overrides
OnBeginDragging(Object, CancelEventArgs)
Raises the CommandBarStripElement.BeginDrag event
Declaration
protected virtual void OnBeginDragging(object sender, CancelEventArgs args)
Parameters
|
System.Object
sender
The element that is responsible for firing the event. |
|
System.ComponentModel.CancelEventArgs
args
A System.ComponentModel.CancelEventArgs that contains the event data. |
OnBubbleEvent(RadElement, RoutedEventArgs)
Declaration
protected override void OnBubbleEvent(RadElement sender, RoutedEventArgs args)
Parameters
|
RadElement
sender
|
|
RoutedEventArgs
args
|
Overrides
OnDragging(Object, MouseEventArgs)
Raises the CommandBarStripElement.Drag event
Declaration
protected virtual void OnDragging(object sender, MouseEventArgs args)
Parameters
|
System.Object
sender
The element that is responsible for firing the event. |
|
System.Windows.Forms.MouseEventArgs
args
A System.Windows.Forms.MouseEventArgs that contains the event data. |
OnEndDragging(Object, EventArgs)
Raises the CommandBarStripElement.EndDrag event
Declaration
protected virtual void OnEndDragging(object sender, EventArgs args)
Parameters
|
System.Object
sender
The element that is responsible for firing the event. |
|
System.EventArgs
args
A System.EventArgs that contains the event data. |
OnItemClicked(Object, EventArgs)
Raises the CommandBarStripElement.ItemClicked event.
Declaration
protected virtual void OnItemClicked(object sender, EventArgs e)
Parameters
|
System.Object
sender
The element that is responsible for firing the event. |
|
System.EventArgs
e
A System.EventArgs that contains the event data. |
OnItemOutOfOverflow(Object, EventArgs)
Raises the CommandBarStripElement.ItemOutOfOverflow event.
Declaration
protected virtual void OnItemOutOfOverflow(object sender, EventArgs e)
Parameters
|
System.Object
sender
The element that is responsible for firing the event. |
|
System.EventArgs
e
A System.EventArgs that contains the event data. |
OnItemOverflowed(Object, EventArgs)
Raises the CommandBarStripElement.ItemOverflowed event.
Declaration
protected virtual void OnItemOverflowed(object sender, EventArgs e)
Parameters
|
System.Object
sender
The element that is responsible for firing the event. |
|
System.EventArgs
e
A System.EventArgs that contains the event data. |
OnItemsChanged(RadCommandBarBaseItemCollection, RadCommandBarBaseItem, ItemsChangeOperation)
Raises the CommandBarStripElement.ItemsChanged event.
Declaration
protected virtual void OnItemsChanged(RadCommandBarBaseItemCollection changed, RadCommandBarBaseItem target, ItemsChangeOperation operation)
Parameters
|
RadCommandBarBaseItemCollection
changed
The collection that is changed. |
|
RadCommandBarBaseItem
target
The targeted element of the collection. |
|
ItemsChangeOperation
operation
The type of the operation. |
OnItemVisibleInStripChanged(Object, EventArgs)
Raises the CommandBarStripElement.ItemVisibleInStripChanged event.
Declaration
protected virtual void OnItemVisibleInStripChanged(object sender, EventArgs e)
Parameters
|
System.Object
sender
The element that is responsible for firing the event. |
|
System.EventArgs
e
A System.EventArgs that contains the event data. |
OnItemVisibleInStripChanging(Object, CancelEventArgs)
Raises the CommandBarStripElement.ItemVisibleInStripChanging event.
Declaration
protected virtual bool OnItemVisibleInStripChanging(object sender, CancelEventArgs e)
Parameters
|
System.Object
sender
The element that is responsible for firing the event. |
|
System.ComponentModel.CancelEventArgs
e
A System.ComponentModel.CancelEventArgs that contains the event data. |
Returns
|
System.Boolean
true if the event should be canceled, false otherwise. |
OnLineChanged(EventArgs)
Raises the CommandBarStripElement.LineChanged event.
Declaration
protected virtual void OnLineChanged(EventArgs e)
Parameters
|
System.EventArgs
e
A System.EventArgs that contains the event data. |
OnLineChanging(CancelEventArgs)
Raises the CommandBarStripElement.LineChanging event.
Declaration
protected virtual bool OnLineChanging(CancelEventArgs e)
Parameters
|
System.ComponentModel.CancelEventArgs
e
A System.ComponentModel.CancelEventArgs that contains the event data. |
Returns
|
System.Boolean
true if the event should be canceled, false otherwise. |
OnOrientationChanged(EventArgs)
Raises the CommandBarStripElement.OrientationChanged event.
Declaration
protected virtual void OnOrientationChanged(EventArgs e)
Parameters
|
System.EventArgs
e
A System.EventArgs that contains the event data. |
OnOrientationChanging(CancelEventArgs)
Raises the CommandBarStripElement.OrientationChanging event.
Declaration
protected virtual bool OnOrientationChanging(CancelEventArgs e)
Parameters
|
System.ComponentModel.CancelEventArgs
e
A System.ComponentModel.CancelEventArgs that contains the event data. |
Returns
|
System.Boolean
true if the event should be canceled, false otherwise. |
OnOverflowMenuClosed(Object, EventArgs)
Raises the CommandBarStripElement.OverflowMenuClosed event.
Declaration
protected virtual void OnOverflowMenuClosed(object sender, EventArgs e)
Parameters
|
System.Object
sender
The element that is responsible for firing the event. |
|
System.EventArgs
e
A System.EventArgs that contains the event data. |
OnOverflowMenuClosing(Object, CancelEventArgs)
Raises the CommandBarStripElement.OverflowMenuClosing event.
Declaration
protected virtual void OnOverflowMenuClosing(object sender, CancelEventArgs e)
Parameters
|
System.Object
sender
The element that is responsible for firing the event. |
|
System.ComponentModel.CancelEventArgs
e
A System.ComponentModel.CancelEventArgs that contains the event data. |
OnOverflowMenuOpened(Object, EventArgs)
Raises the CommandBarStripElement.OverflowMenuOpened event.
Declaration
protected virtual void OnOverflowMenuOpened(object sender, EventArgs e)
Parameters
|
System.Object
sender
The element that is responsible for firing the event. |
|
System.EventArgs
e
A System.EventArgs that contains the event data. |
OnOverflowMenuOpening(Object, CancelEventArgs)
Raises the CommandBarStripElement.OverflowMenuOpening event.
Declaration
protected virtual void OnOverflowMenuOpening(object sender, CancelEventArgs e)
Parameters
|
System.Object
sender
The element that is responsible for firing the event. |
|
System.ComponentModel.CancelEventArgs
e
A System.ComponentModel.CancelEventArgs that contains the event data. |
OnPanGesture(PanGestureEventArgs)
Declaration
protected override void OnPanGesture(PanGestureEventArgs args)
Parameters
|
PanGestureEventArgs
args
|
Overrides
OnVisibleInCommandBarChanged(EventArgs)
Raises the CommandBarStripElement.VisibleInCommandBarChanged event.
Declaration
protected virtual void OnVisibleInCommandBarChanged(EventArgs e)
Parameters
|
System.EventArgs
e
A System.EventArgs that contains the event data. |
OnVisibleInCommandBarChanging(CancelEventArgs)
Raises the CommandBarStripElement.VisibleInCommandBarChanging event.
Declaration
protected virtual bool OnVisibleInCommandBarChanging(CancelEventArgs e)
Parameters
|
System.ComponentModel.CancelEventArgs
e
A System.ComponentModel.CancelEventArgs that contains the event data. |
Returns
|
System.Boolean
true if the event should be canceled, false otherwise. |
SetOrientationCore(Orientation)
Applies an orientation to the strip and its children.
Declaration
protected void SetOrientationCore(Orientation value)
Parameters
|
System.Windows.Forms.Orientation
value
The orientation to apply. |
UnwireEvents()
Unsubscribe from the children's events.
Declaration
protected virtual void UnwireEvents()
WireEvents()
Subscribes to the children's events.
Declaration
protected virtual void WireEvents()
Events
BeginDrag
Occurs before dragging is started.
Declaration
public event CancelEventHandler BeginDrag
Event Type
|
System.ComponentModel.CancelEventHandler
|
Drag
Occurs when item is being dragged.
Declaration
public event MouseEventHandler Drag
Event Type
|
System.Windows.Forms.MouseEventHandler
|
EndDrag
Occurs when item is released and dragging is stopped.
Declaration
public event EventHandler EndDrag
Event Type
|
System.EventHandler
|
ItemClicked
Occurs when item is clicked.
Declaration
public event EventHandler ItemClicked
Event Type
|
System.EventHandler
|
ItemOutOfOverflow
Occurs when item is moved out from the overflow panel.
Declaration
public event EventHandler ItemOutOfOverflow
Event Type
|
System.EventHandler
|
ItemOverflowed
Occurs when item is moved to the overflow panel.
Declaration
public event EventHandler ItemOverflowed
Event Type
|
System.EventHandler
|
ItemsChanged
Occurs when Items collection is changed.
Declaration
public event RadCommandBarBaseItemCollectionItemChangedDelegate ItemsChanged
Event Type
|
RadCommandBarBaseItemCollectionItemChangedDelegate
|
ItemVisibleInStripChanged
Occurs when item is moved in or out of the UncheckedItems collection.
Declaration
public event EventHandler ItemVisibleInStripChanged
Event Type
|
System.EventHandler
|
ItemVisibleInStripChanging
Occurs before item is moved in or out of the UncheckedItems collection.
Declaration
public event CancelEventHandler ItemVisibleInStripChanging
Event Type
|
System.ComponentModel.CancelEventHandler
|
LineChanged
Occurs when VisibleInCommandBar property is changed.
Declaration
public event EventHandler LineChanged
Event Type
|
System.EventHandler
|
LineChanging
Occurs before VisibleInCommandBar property is changed.
Declaration
public event CancelEventHandler LineChanging
Event Type
|
System.ComponentModel.CancelEventHandler
|
OrientationChanged
Occurs when Orientation property is changed.
Declaration
public event EventHandler OrientationChanged
Event Type
|
System.EventHandler
|
OrientationChanging
Occurs before Orientation property is changed.
Declaration
public event CancelEventHandler OrientationChanging
Event Type
|
System.ComponentModel.CancelEventHandler
|
OverflowMenuClosed
Occurs when overflow menu is opened.
Declaration
public event EventHandler OverflowMenuClosed
Event Type
|
System.EventHandler
|
OverflowMenuClosing
Occurs before oferflow menu is opened.
Declaration
public event CancelEventHandler OverflowMenuClosing
Event Type
|
System.ComponentModel.CancelEventHandler
|
OverflowMenuOpened
Occurs when overflow menu is opened.
Declaration
public event EventHandler OverflowMenuOpened
Event Type
|
System.EventHandler
|
OverflowMenuOpening
Occurs before overflow menu is opened.
Declaration
public event CancelEventHandler OverflowMenuOpening
Event Type
|
System.ComponentModel.CancelEventHandler
|
VisibleInCommandBarChanged
Occurs when VisibleInCommandBar property is changed.
Declaration
public event EventHandler VisibleInCommandBarChanged
Event Type
|
System.EventHandler
|
VisibleInCommandBarChanging
Occurs before VisibleInCommandBar property is changed.
Declaration
public event CancelEventHandler VisibleInCommandBarChanging
Event Type
|
System.ComponentModel.CancelEventHandler
|