Displays a tab in the tab strip and provides its selected, pinned, and close-button behavior.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class RadTabbedFormControlItem : LightVisualElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemUIItemBaseLightVisualElementRadTabbedFormControlItem...
Implements:
Inherited Members
Constructors
public RadTabbedFormControlItem()
Fields
Identifies the padding applied to the tab item's fill without changing its layout bounds.
public static RadProperty FillPaddingProperty
Identifies the property that marks a tab item as selected for visual-state styling.
public static RadProperty IsSelectedProperty
Properties
Gets the stack that contains the pin and close buttons.
public StackLayoutPanel ButtonsStack { get; }
Gets the button that closes the associated tab.
public LightVisualButtonElement CloseButton { get; }
Gets or sets the padding that defines the offset of element's fill. This does not affect element's layout logic such as size and location but has only appearance impact.
public Padding FillPadding { get; set; }
Gets or sets whether this item is kept in the pinned portion of the tab strip. Changing the value updates the owner's pinned-item collection and layout.
public bool IsPinned { get; set; }
Determines whether the item is currently selected (associated with the SelectedTab of the owning RadTabbedFormControl).
[Browsable(false)]
public bool IsSelected { get; set; }
Gets the element that coordinates this item's selection, pinning, and layout.
public RadTabbedFormControlElement Owner { get; }
The owning tabbed-form element, or null before attachment.
Gets the button that toggles whether this item is pinned.
public LightVisualButtonElement PinButton { get; }
Gets the RadTabbedFormControlTab instance associated with this item.
[Browsable(false)]
public RadTabbedFormControlTab Tab { get; }
Methods
Creates the button stack and its pin and close buttons.
protected override void CreateChildElements()
Overrides:
Creates the close button used by this tab item.
protected virtual LightVisualButtonElement CreateCloseButtonElement()
The button element to add to the item's button stack.
Creates the pin button used by this tab item.
protected virtual LightVisualButtonElement CreatePinButtonElement()
The button element to add to the item's button stack.
Clears the tab association and removes the pin and close button event handlers.
public virtual void Detach()
Sets the default interaction, text, border, fill, and shape settings for a tab item.
protected override void InitializeFields()
Overrides:
Deflates the fill rectangle by the specified padding.
protected virtual RectangleF ModifyBorderAndFillPaintRect(RectangleF preferred, Padding padding)
The rectangle supplied by the layout.
paddingPaddingThe inset to apply.
Returns:The preferred rectangle deflated by padding.
Forwards the click to the owning tabbed-form element so it can select this item.
Closes the associated tab when the close button is released over the button at runtime.
protected virtual void OnCloseButtonMouseUp(object sender, MouseEventArgs e)
The close button that raised the event.
eMouseEventArgsThe mouse event data.
Updates the pin glyph and informs the owner that the pinned-item layout may have changed.
protected virtual void OnIsPinnedChanged(bool isPinned)
The new pinned state.
Records the drag origin and forwards the mouse-down event to the owner.
protected override void OnMouseDown(MouseEventArgs e)
The mouse event data.
Overrides:
Requests an item drag when the pointer has moved far enough from its recorded drag origin.
protected override void OnMouseMove(MouseEventArgs e)
The mouse event data.
Overrides:
Forwards the mouse-up event to the owner.
protected override void OnMouseUp(MouseEventArgs e)
The mouse event data.
Overrides:
Brings the item into view when it becomes selected.
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
The property-change data.
Overrides:
Applies the selected item's fill padding before delegating fill painting to the base element.
protected override void PaintFill(IGraphics graphics, float angle, SizeF scale, RectangleF rect)
The graphics surface used for painting.
anglefloatThe rotation angle.
scaleSizeFThe scale applied to the element.
rectRectangleFThe preferred fill rectangle.
Overrides:
Removes the temporary z-order and position overrides applied for dragging.
protected virtual void RestoreDefaulTabState()
Applies the temporary z-order and horizontal offset used while this item is dragged.
protected virtual void SetDragTabState(DragDirection direction, int deltaX)
The direction of the drag.
deltaXintThe horizontal drag distance before DPI scaling.