Lays out the tab items, pinned items, and navigation buttons in a tabbed-form caption.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class RadTabbedFormControlTabsElement : LightVisualElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemUIItemBaseLightVisualElementRadTabbedFormControlTabsElement...
Implements:
Inherited Members
Constructors
public RadTabbedFormControlTabsElement()
Fields
Identifies the minimum tab width used when calculating the visible tab layout.
public static RadProperty MinimumTabWidthProperty
Identifies whether pinned tabs are arranged before or after unpinned tabs.
public static RadProperty PinnedItemsPositionProperty
Identifies whether the new-tab button is displayed.
public static RadProperty ShowNewTabButtonProperty
Identifies whether each tab displays a close button.
public static RadProperty ShowTabCloseButtonProperty
Identifies whether each tab displays a pin button.
public static RadProperty ShowTabPinButtonProperty
Identifies the default tab height.
public static RadProperty TabHeightProperty
Identifies the spacing between adjacent tabs.
public static RadProperty TabSpacingProperty
Identifies the preferred maximum width of each tab.
public static RadProperty TabWidthProperty
Properties
Gets or sets the minimum width of the tab.
public int MinimumTabWidth { get; set; }
Gets the RadTabbedFormControlItem which stands for adding new tabs on click.
[Browsable(false)]
public LightVisualButtonElement NewItem { get; }
Gets the button element navigating the layout to show tabs to right of the currenlty visible tabs.
[Browsable(false)]
public LightVisualButtonElement NextItemsButton { get; }
Gets an observable collection holding the pinned items.
public ObservableCollection<RadTabbedFormControlItem> PinnedItems { get; }
Gets or sets whether the pinned items will be displayed at the front or at the back of the title bar.
public PinnedItemsPosition PinnedItemsPosition { get; set; }
Gets the button element navigating the layout to show tabs to left of the currenlty visible tabs
[Browsable(false)]
public LightVisualButtonElement PreviousItemsButton { get; }
Gets or sets whether the new tab button will be visible.
public bool ShowNewTabButton { get; set; }
Gets or sets whether close button will be displayed in the tab.
public bool ShowTabCloseButton { get; set; }
Gets or sets whether pin button will be displayed in the tab.
public bool ShowTabPinButton { get; set; }
Gets or sets the spacing between the tabs.
public int TabSpacing { get; set; }
Gets an read only collection holding the visible items.
public ReadOnlyCollection<RadTabbedFormControlItem> VisibleItems { get; }
Methods
Arranges one tab item and advances the horizontal position by its width and the configured spacing.
protected virtual void ArrangeTabItem(RadElement child, float width, float height, ref float x, float y)
The item to arrange.
widthfloatThe width assigned to the item.
heightfloatThe height assigned to the item.
xfloatThe horizontal position, advanced after arrangement.
yfloatThe vertical position for the item.
Arranges the visible items in a collection, optionally skipping items already handled as pinned.
protected virtual void ArrangeTabItems(IList<RadTabbedFormControlItem> tabItems, float actualTabWidth, float actualHeight, ref float x, float y, bool shouldCheckForPinnedItems)
The items to arrange.
actualTabWidthfloatThe width assigned to each tab.
actualHeightfloatThe height assigned to each tab.
xfloatThe horizontal position, advanced as items are arranged.
yfloatThe vertical position for the items.
shouldCheckForPinnedItemsbooltrue to skip items in PinnedItems.
Creates the new-tab and tab-navigation buttons and adds them to the element tree.
protected override void CreateChildElements()
Overrides:
Creates the button that raises NewItemClicked.
protected virtual LightVisualButtonElement CreateNewItemElement()
The new-tab button element.
Creates the button that scrolls toward later tab items.
protected virtual LightVisualButtonElement CreateNextItemsElement()
The next-items button element.
Creates the button that scrolls toward earlier tab items.
protected virtual LightVisualButtonElement CreatePreviousItemsElement()
The previous-items button element.
Unsubscribes from collection and button events and clears the cached visible-item list.
protected override void DisposeManagedResources()
Overrides:
Chooses the width per tab by capping the available width at TabWidth and then applying MinimumTabWidth.
Gets the non-collapsed tab-item children in their current visual order.
protected virtual List<RadTabbedFormControlItem> GetTabItems()
List<RadTabbedFormControlItem>
The visible tab items.
Selects up to count items around a center item for the current visible window.
protected virtual IList<RadTabbedFormControlItem> GetVisibleTabItems(IList<RadTabbedFormControlItem> tabItems, int count, RadTabbedFormControlElement element, RadTabbedFormControlItem centerItem)
The tab items in collection order.
countintThe number of items to include.
elementRadTabbedFormControlElementThe owning element used to map the center item to its tab index.
centerItemRadTabbedFormControlItemThe item around which the visible window is built.
Returns:IList<RadTabbedFormControlItem>
The items selected for the visible window.
Initializes the pinned-item collection and enables layout and mouse-input handling.
protected override void InitializeFields()
Overrides:
Forwards a double-click to the containing caption when this element is hosted there.
protected override void OnDoubleClick(EventArgs e)
The event data.
Overrides:
Updates tab button visibility when the corresponding display properties change.
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
The property-change data.
Overrides:
Builds the preceding visible window after a backward-navigation request.
protected virtual List<RadTabbedFormControlItem> UpdateVisibleItemsWithBackwardOffset(int count)
The negative number of items to move backward.
Returns:List<RadTabbedFormControlItem>
The tab items in the preceding window.
Builds the following visible window after a forward-navigation request.
protected virtual List<RadTabbedFormControlItem> UpdateVisibleItemsWithForwardOffset(int count)
The positive number of items to move forward.
Returns:List<RadTabbedFormControlItem>
The tab items in the following window.
Events
Occurs when the user clicks the new-tab button.
public event EventHandler NewItemClicked