SegmentedPivot
Description
A segmented navigation pivot
A SegmentedPivot is a tabbed interface styled as a segmented control. It's best used for toggling between closely related views or filters where space is limited.
The active tab's content is wrapped the same way a Stack wraps its children, so sizing extensions such as .S(), .WS(), .HS(), and .Grow() applied to the component returned by a tab's content factory take effect on the wrapper and fill the available space — the same behavior as adding a component to a Stack.
Sample
API reference
public sealed class SegmentedPivot : IComponent, ISpecialCaseStyling, IBindableComponent<string>A pill-style pivot variant where the tabs share a connected segmented-control look.
- Namespace
- Tesserae
- Implements
- IComponent, ISpecialCaseStyling, IBindableComponent<string>
Constructors
| Name | Description |
|---|---|
| SegmentedPivot | Initializes a new instance of this class. |
Properties
| Name | Description |
|---|---|
| SelectedTab | Gets or sets the selected tab. |
| StylingContainer | Gets the HTMLElement that should receive styling. Exposing the root as the styling container (via ISpecialCaseStyling) lets sizing helpers like .S() / .Grow() write directly onto the pivot instead of an extra wrapper when it is placed inside a Stack or Grid, matching Pivot. |
| PropagateToStackItemParent | Gets whether styling should propagate to the stack item parent. |
public HTMLElement StylingContainer { get; }Gets the HTMLElement that should receive styling. Exposing the root as the styling container (via ISpecialCaseStyling) lets sizing helpers like .S() / .Grow() write directly onto the pivot instead of an extra wrapper when it is placed inside a Stack or Grid, matching Pivot.
Methods
| Name | Description |
|---|---|
| OnBeforeNavigate | Registers a callback invoked when the before navigate event fires. |
| OnNavigate | Registers a callback invoked when the navigate event fires. |
| RefreshPivotSizes | Refreshes the pivot sizes, re-evaluating whether the scroll and overflow controls should be visible. Useful after the pivot's container changes size in a way a ResizeObserver can't observe. |
| Select | Configures the component to select. |
| AsObservable | Returns an observable that tracks the id of the currently-selected tab. |
| SetBoundValue | Programmatically selects a tab by id as part of a two-way binding. |
| Render | Renders the component's root HTML element. |
public void RefreshPivotSizes()Refreshes the pivot sizes, re-evaluating whether the scroll and overflow controls should be visible. Useful after the pivot's container changes size in a way a ResizeObserver can't observe.
public SegmentedPivot Select(string id, bool refresh = false)Configures the component to select.
public IObservable<string> AsObservable()Returns an observable that tracks the id of the currently-selected tab.
public void SetBoundValue(string value)Programmatically selects a tab by id as part of a two-way binding.