Table of Contents

Class TabView

Namespace
PluginUI
Assembly
PluginUI.dll

Tabbed pages: a tab strip (top or left) with an animated selection indicator, and the selected page's content. Only the selected page is attached to the host (unselected pages cost nothing). Keyboard: Ctrl+Tab / Ctrl+Shift+Tab from anywhere inside, arrows when the strip has the focus.

public class TabView : Panel
Inheritance
TabView
Inherited Members

Constructors

TabView()

Creates a tab view.

public TabView()

Properties

AnimateIndicator

Animates the selection indicator.

public bool AnimateIndicator { get; set; }

Property Value

bool

DrawFrame

Draws a frame around the page area.

public bool DrawFrame { get; set; }

Property Value

bool

Pages

Pages.

public Collection<TabPage> Pages { get; }

Property Value

Collection<TabPage>

Placement

Tab strip position.

public TabPlacement Placement { get; set; }

Property Value

TabPlacement

SelectedIndex

Index of the selected page (-1 = none).

public int SelectedIndex { get; set; }

Property Value

int

SelectedPage

Selected page.

public TabPage? SelectedPage { get; }

Property Value

TabPage

StretchTabs

Stretches the tabs over the whole strip width (top placement).

public bool StretchTabs { get; set; }

Property Value

bool

StripWidth

Width of the strip in left placement (0 = fit the captions).

public float StripWidth { get; set; }

Property Value

float

TabHeight

Height of the strip (top placement) or of each tab (left placement).

public float TabHeight { get; set; }

Property Value

float

Methods

AddPage(string, UIElement)

Adds a page (fluent).

public TabView AddPage(string header, UIElement content)

Parameters

header string
content UIElement

Returns

TabView

ArrangeOverride(Rect)

Arranges children inside the final bounds.

protected override void ArrangeOverride(Rect bounds)

Parameters

bounds Rect

MeasureOverride(Size)

Natural size of the content for the available size (margins excluded).

protected override Size MeasureOverride(Size available)

Parameters

available Size

Returns

Size

OnKeyDown(KeyEventArgs)

Key pressed while focused (bubbles to parents).

protected override void OnKeyDown(KeyEventArgs e)

Parameters

e KeyEventArgs

OnMouseDown(MouseEventArgs)

Mouse button pressed over the element (or captured).

protected override void OnMouseDown(MouseEventArgs e)

Parameters

e MouseEventArgs

OnMouseLeave()

The mouse left the element.

protected override void OnMouseLeave()

OnMouseMove(MouseEventArgs)

Mouse moved over the element (or captured).

protected override void OnMouseMove(MouseEventArgs e)

Parameters

e MouseEventArgs

OnRender(DrawingContext)

Draws the element (below its children).

protected override void OnRender(DrawingContext dc)

Parameters

dc DrawingContext

Events

SelectionChanged

Raised when the selected page changes.

public event Action<TabView, int>? SelectionChanged

Event Type

Action<TabView, int>