TabLabels

public sealed class TabLabels
Collection of TabLabel with active tab management.

Properties

ActiveIndex

#
public int ActiveIndex { get; set; }
Gets or sets the active tab. Usually this field is assigned as a response to user mouseclicks on the control.

ActiveTab

#
public TabLabel ActiveTab { get; set; }
Gets or sets the active tab.

HasActive

#
public bool HasActive { get; }
Test whether this collection has a valid active tab.

IsEmpty

#
public bool IsEmpty { get; }
Gets whether this collection is empty.

LeftToRight

#
public IEnumerable<TabLabel> LeftToRight { get; }
Enumerate over all tabs from left to right.

LeftToRightUpToActive

#
public IEnumerable<TabLabel> LeftToRightUpToActive { get; }
Enumerate over all tabs from left to right up to but not including the active tab.

RightToLeft

#
public IEnumerable<TabLabel> RightToLeft { get; }
Enumerate over all tabs from right to left.

RightToLeftUpToActive

#
public IEnumerable<TabLabel> RightToLeftUpToActive { get; }
Enumerate over all tabs from right to left up to but not including the active tab.

TotalWidth

#
public float TotalWidth { get; }
Gets the total width of all the tab labels.

ToTheLeftOfActive

#
public IEnumerable<TabLabel> ToTheLeftOfActive { get; }
Enumerate over all tabs to the left of the active tab, going from right to left.

ToTheRightOfActive

#
public IEnumerable<TabLabel> ToTheRightOfActive { get; }
Enumerate over all tabs to the right of the active tab, going from left to right.

Methods

Activate

#
public bool Activate(CompositionChapter chapter)
Activate the tab matching the given chapter.
chapter (CompositionChapter)
True if a different tab is now active.

Activate

#
public bool Activate(PointF point)
Activate the tab under the given coordinate.
point (PointF)
True if a different tab is now active.

EnsureActive

#
public void EnsureActive()
Ensures that there's a valid active tab, provided there's at least one tab in this collection.

IsActive

#
public bool IsActive(TabLabel tab)
Test whether a specific label is the active one.
tab (TabLabel)