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
Stores the strip's desired position while layout and row placement are updated.
protected PointF cachedDesiredLocation
Identifies the strip's desired position; moving it beyond its current row can trigger a line change.
public static RadProperty DesiredLocationProperty
Identifies whether the strip is displayed in the command bar.
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 whether the strip is currently being 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; }
Gets the effective minimum size and retains assigned values for use while the strip is visible or hosted by a designer.
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 an empty string; assigned text is passed to the base property but is not returned by this override.
public override string Text { get; set; }
Overrides:
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 grip, item layout, and overflow button according to the strip's orientation and reading direction.
Creates the strip's item collection, grip, item layout, and overflow button, then connects their events.
protected override void CreateChildElements()
Overrides:
Creates the default overflow button associated with this strip.
protected virtual RadCommandBarOverflowButton CreateCommandBarOverflowButton()
A new overflow button owned by this strip.
Removes the event subscriptions established for the strip's child elements.
protected override void DisposeManagedResources()
Overrides:
Requests a drag start through the grip using a synthetic left-button mouse event at the strip's location.
protected void ForceBeginDrag()
Forces the drag to end.
protected void ForceEndDrag()
Suppresses a drag-hint image for the strip.
Measures the items with the size given and calculates the expected size of the strip including the RadCommandBarGrip and RadCommandBarOverflowButton.
Measures the grip, item layout, and overflow button along the strip's orientation, returning an empty size when the strip is hidden at runtime or collapsed.
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.
Routes grip-drag, item-click, and item-visibility events from children through the strip's corresponding event hooks.
protected override void OnBubbleEvent(RadElement sender, RoutedEventArgs args)
The child element that raised the event.
argsRoutedEventArgsThe routed event and its original event data.
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.
Moves the strip's desired location along its orientation axis and marks the pan gesture handled.
protected override void OnPanGesture(PanGestureEventArgs args)
The gesture offset applied to the strip.
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 after the strip is moved to another row.
public event EventHandler LineChanged
Occurs before the strip is moved to another row. Cancel the event to prevent the move.
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 after the overflow menu closes.
public event EventHandler OverflowMenuClosed
Occurs before the overflow menu closes. Cancel the event to keep the menu open.
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