Represent a single strip with controls inside
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class CommandBarStripElement : RadCommandBarVisualElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemUIItemBaseLightVisualElementRadCommandBarVisualElementCommandBarStripElement...
Implements:
Inherited Members
Constructors
public CommandBarStripElement()
Fields
protected PointF cachedDesiredLocation
public static RadProperty DesiredLocationProperty
public static RadProperty VisibleInCommandBarProperty
Properties
Gets or sets the desired location of the strip element.
[Browsable(false)]
public PointF DesiredLocation { get; set; }
Gets or sets if the strip can be dragged.
[Browsable(true)]
public bool EnableDragging { get; set; }
Gets or sets if the strip can be floating.
[Browsable(true)]
public bool EnableFloating { get; set; }
Gets the form in which the items are placed where the strip is floating.
[Browsable(false)]
public CommandBarFloatingForm FloatingForm { get; set; }
Gets or sets the RadCommandBarGrip element of the strip.
[Browsable(true)]
public RadCommandBarGrip Grip { get; set; }
Gets whether the strip has items in its overflow panel.
[Browsable(false)]
public bool HasOverflowedItems { get; }
Gets or sets whether the strip is beeing dragged.
[Browsable(false)]
public bool IsDrag { get; }
Gets the items contained in the strip.
[RadEditItemsAction]
[RadNewItem("", false, false, false)]
public RadCommandBarBaseItemCollection Items { get; }
Gets the layout panel in which the items are arranged.
[Browsable(false)]
public RadCommandBarItemsPanel ItemsLayout { get; }
Get or sets the minimum size to apply on an element when layout is calculated.
public override Size MinSize { get; set; }
Overrides:
Gets or sets the elements orientation inside the line element. Possible values are horizontal and vertical.
[Browsable(false)]
public override Orientation Orientation { get; set; }
Overrides:
Gets or sets the RadCommandBarOverflowButton element of the strip.
[Browsable(true)]
public RadCommandBarOverflowButton OverflowButton { get; set; }
Gets or sets Overflow menu single strip maximum size.
[Browsable(false)]
public Size OverflowMenuMaxSize { get; set; }
Gets or sets Overflow menu single strip minimum size.
[Browsable(false)]
public Size OverflowMenuMinSize { get; set; }
Gets or sets the text displayed by this item.
public override string Text { get; set; }
The text content of the item. The default value is an empty string.
Overrides:
This property supports data binding and localization. The text can contain HTML markup when the HTML support is enabled for the containing control. Changes to this property will trigger layout updates and repainting of the item.
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.
[Browsable(true)]
public bool VisibleInCommandBar { get; set; }
Methods
Arranges the content and child elements within the final allocated space, positioning text, images, and child elements.
Called by the element when constructed. Allows inheritors to build the element tree.
protected override void CreateChildElements()
Overrides:
protected virtual RadCommandBarOverflowButton CreateCommandBarOverflowButton()
Disposes of managed resources including cached images and SVG images when the element is being disposed.
protected override void DisposeManagedResources()
Overrides:
protected void ForceBeginDrag()
Forces the drag to end.
protected void ForceEndDrag()
Gets the image to be used as a hint when this element is being dragged.
protected override Image GetDragHintCore()
An image representing the drag hint for this element.
Overrides:
Measures the items with the size given and calculates the expected size of the strip including the RadCommandBarGrip and RadCommandBarOverflowButton.
Measures the desired size of the element by calculating the space needed for content, padding, and borders.
Raises the event
protected virtual void OnBeginDragging(object sender, CancelEventArgs args)
The element that is responsible for firing the event.
argsCancelEventArgsA CancelEventArgs that contains the event data.
Called when the bubble phase of a routed event occurs.
protected override void OnBubbleEvent(RadElement sender, RoutedEventArgs args)
The element that originally raised the event.
argsRoutedEventArgsThe routed event arguments.
Overrides:
Raises the event
protected virtual void OnDragging(object sender, MouseEventArgs args)
The element that is responsible for firing the event.
argsMouseEventArgsA MouseEventArgs that contains the event data.
Raises the event.
protected virtual void OnItemsChanged(RadCommandBarBaseItemCollection changed, RadCommandBarBaseItem target, ItemsChangeOperation operation)
The collection that is changed.
targetRadCommandBarBaseItemThe targeted element of the collection.
operationItemsChangeOperationThe type of the operation.
Raises the event.
protected virtual bool OnItemVisibleInStripChanging(object sender, CancelEventArgs e)
The element that is responsible for firing the event.
eCancelEventArgsA CancelEventArgs that contains the event data.
Returns:true if the event should be canceled, false otherwise.
Raises the event.
protected virtual bool OnLineChanging(CancelEventArgs e)
A CancelEventArgs that contains the event data.
Returns:true if the event should be canceled, false otherwise.
Raises the event.
protected virtual bool OnOrientationChanging(CancelEventArgs e)
A CancelEventArgs that contains the event data.
Returns:true if the event should be canceled, false otherwise.
Raises the event.
protected virtual void OnOverflowMenuClosing(object sender, CancelEventArgs e)
The element that is responsible for firing the event.
eCancelEventArgsA CancelEventArgs that contains the event data.
Raises the event.
protected virtual void OnOverflowMenuOpening(object sender, CancelEventArgs e)
The element that is responsible for firing the event.
eCancelEventArgsA CancelEventArgs that contains the event data.
Fires the PanGesture event.
protected override void OnPanGesture(PanGestureEventArgs args)
The arguments for the PanGesture event.
Overrides:
Raises the event.
protected virtual bool OnVisibleInCommandBarChanging(CancelEventArgs e)
A CancelEventArgs that contains the event data.
Returns:true if the event should be canceled, false otherwise.
Applies an orientation to the strip and its children.
protected void SetOrientationCore(Orientation value)
The orientation to apply.
Unsubscribe from the children's events.
protected virtual void UnwireEvents()
Subscribes to the children's events.
protected virtual void WireEvents()
Events
Occurs before dragging is started.
public event CancelEventHandler BeginDrag
Occurs when item is being dragged.
public event MouseEventHandler Drag
Occurs when item is released and dragging is stopped.
public event EventHandler EndDrag
Occurs when item is clicked.
public event EventHandler ItemClicked
Occurs when item is moved out from the overflow panel.
public event EventHandler ItemOutOfOverflow
Occurs when item is moved to the overflow panel.
public event EventHandler ItemOverflowed
Occurs when Items collection is changed.
public event RadCommandBarBaseItemCollectionItemChangedDelegate ItemsChanged
Occurs when item is moved in or out of the UncheckedItems collection.
public event EventHandler ItemVisibleInStripChanged
Occurs before item is moved in or out of the UncheckedItems collection.
public event CancelEventHandler ItemVisibleInStripChanging
Occurs when VisibleInCommandBar property is changed.
public event EventHandler LineChanged
Occurs before VisibleInCommandBar property is changed.
public event CancelEventHandler LineChanging
Occurs when Orientation property is changed.
public event EventHandler OrientationChanged
Occurs before Orientation property is changed.
public event CancelEventHandler OrientationChanging
Occurs when overflow menu is opened.
public event EventHandler OverflowMenuClosed
Occurs before oferflow menu is opened.
public event CancelEventHandler OverflowMenuClosing
Occurs when overflow menu is opened.
public event EventHandler OverflowMenuOpened
Occurs before overflow menu is opened.
public event CancelEventHandler OverflowMenuOpening
Occurs when VisibleInCommandBar property is changed.
public event EventHandler VisibleInCommandBarChanged
Occurs before VisibleInCommandBar property is changed.
public event CancelEventHandler VisibleInCommandBarChanging