TabBarWidget
Namespace: Hex1b.Widgets
Assembly: Hex1b.dll
A horizontal tab bar widget that displays tabs with optional overflow navigation. Can be used standalone or as part of a TabPanel.
public sealed record TabBarWidget : Hex1bWidget, IEquatable<Hex1bWidget>, IEquatable<TabBarWidget>Inheritance
Object → Hex1bWidget → TabBarWidget
Implements
Constructors
TabBarWidget(IReadOnlyList<TabItemWidget>)
A horizontal tab bar widget that displays tabs with optional overflow navigation. Can be used standalone or as part of a TabPanel.
Parameters:
Tabs(IReadOnlyList<TabItemWidget>): The list of tabs to display.
public TabBarWidget(IReadOnlyList<TabItemWidget> Tabs)Properties
Position
The position of tabs (top or bottom). Used for rendering style.
Returns: TabPosition
public TabPosition Position { get; init; }RenderMode
The rendering mode for the tab bar.
Returns: TabBarRenderMode
public TabBarRenderMode RenderMode { get; init; }ShowPaging
Whether to show paging arrows when tabs overflow.
Returns: Boolean
public bool ShowPaging { get; init; }ShowSelector
Whether to show the dropdown selector for quick tab navigation.
Returns: Boolean
public bool ShowSelector { get; init; }Tabs
The list of tabs to display.
Returns: IReadOnlyList<TabItemWidget>
public IReadOnlyList<TabItemWidget> Tabs { get; init; }Methods
Compact()
Sets the rendering mode to compact (just the tab row).
Returns: TabBarWidget
public TabBarWidget Compact()Full()
Sets the rendering mode to full (with visual separators).
Returns: TabBarWidget
public TabBarWidget Full()OnSelectionChanged(Action<TabSelectionChangedEventArgs>)
Sets the handler for selection changes.
Parameters:
handler(Action<TabSelectionChangedEventArgs>): The handler to call when selection changes.
Returns: TabBarWidget
public TabBarWidget OnSelectionChanged(Action<TabSelectionChangedEventArgs> handler)OnSelectionChanged(Func<TabSelectionChangedEventArgs, Task>)
Sets the async handler for selection changes.
Parameters:
handler(Func<TabSelectionChangedEventArgs, Task>): The async handler to call when selection changes.
Returns: TabBarWidget
public TabBarWidget OnSelectionChanged(Func<TabSelectionChangedEventArgs, Task> handler)Paging(bool)
Enables or disables paging arrows for tab overflow navigation.
Parameters:
enabled(Boolean):
Returns: TabBarWidget
public TabBarWidget Paging(bool enabled = true)Selector(bool)
Enables or disables the dropdown selector for quick tab navigation.
Parameters:
enabled(Boolean):
Returns: TabBarWidget
public TabBarWidget Selector(bool enabled = true)TabsOnBottom()
Sets the tab position to bottom.
Returns: TabBarWidget
public TabBarWidget TabsOnBottom()TabsOnTop()
Sets the tab position to top.
Returns: TabBarWidget
public TabBarWidget TabsOnTop()Fields
Click
Rebindable action: Select tab or scroll via mouse click.
Returns: ActionId
public static readonly ActionId ClickScrollLeft
Rebindable action: Scroll tabs left.
Returns: ActionId
public static readonly ActionId ScrollLeftScrollRight
Rebindable action: Scroll tabs right.
Returns: ActionId
public static readonly ActionId ScrollRightExamples
ctx.TabBar(tb => [
tb.Tab("Overview").Selected(),
tb.Tab("Settings"),
tb.Tab("Advanced")
])