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
DrawFrame
Draws a frame around the page area.
public bool DrawFrame { get; set; }
Property Value
Pages
Pages.
public Collection<TabPage> Pages { get; }
Property Value
Placement
Tab strip position.
public TabPlacement Placement { get; set; }
Property Value
SelectedIndex
Index of the selected page (-1 = none).
public int SelectedIndex { get; set; }
Property Value
SelectedPage
Selected page.
public TabPage? SelectedPage { get; }
Property Value
StretchTabs
Stretches the tabs over the whole strip width (top placement).
public bool StretchTabs { get; set; }
Property Value
StripWidth
Width of the strip in left placement (0 = fit the captions).
public float StripWidth { get; set; }
Property Value
TabHeight
Height of the strip (top placement) or of each tab (left placement).
public float TabHeight { get; set; }
Property Value
Methods
AddPage(string, UIElement)
Adds a page (fluent).
public TabView AddPage(string header, UIElement content)
Parameters
Returns
ArrangeOverride(Rect)
Arranges children inside the final bounds.
protected override void ArrangeOverride(Rect bounds)
Parameters
boundsRect
MeasureOverride(Size)
Natural size of the content for the available size (margins excluded).
protected override Size MeasureOverride(Size available)
Parameters
availableSize
Returns
OnKeyDown(KeyEventArgs)
Key pressed while focused (bubbles to parents).
protected override void OnKeyDown(KeyEventArgs e)
Parameters
OnMouseDown(MouseEventArgs)
Mouse button pressed over the element (or captured).
protected override void OnMouseDown(MouseEventArgs e)
Parameters
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
OnRender(DrawingContext)
Draws the element (below its children).
protected override void OnRender(DrawingContext dc)
Parameters
Events
SelectionChanged
Raised when the selected page changes.
public event Action<TabView, int>? SelectionChanged