TabPanelWidget
Namespace: Hex1b.Widgets
Assembly: Hex1b.dll
A complete tabbed panel widget with a tab bar and content area. Supports composable tab content with automatic tab switching.
public sealed record TabPanelWidget : Hex1bWidget, IEquatable<Hex1bWidget>, IEquatable<TabPanelWidget>Inheritance
Object → Hex1bWidget → TabPanelWidget
Implements
Constructors
TabPanelWidget(IReadOnlyList<TabItemWidget>)
A complete tabbed panel widget with a tab bar and content area. Supports composable tab content with automatic tab switching.
Parameters:
Tabs(IReadOnlyList<TabItemWidget>): The list of tabs to display.
public TabPanelWidget(IReadOnlyList<TabItemWidget> Tabs)Properties
Position
The position of tabs (top or bottom).
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: TabPanelWidget
public TabPanelWidget Compact()Full()
Sets the rendering mode to full (with visual separators).
Returns: TabPanelWidget
public TabPanelWidget Full()OnSelectionChanged(Action<TabSelectionChangedEventArgs>)
Sets the handler for selection changes.
Parameters:
handler(Action<TabSelectionChangedEventArgs>): The handler to call when selection changes.
Returns: TabPanelWidget
public TabPanelWidget 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: TabPanelWidget
public TabPanelWidget OnSelectionChanged(Func<TabSelectionChangedEventArgs, Task> handler)Paging(bool)
Enables or disables paging arrows for tab overflow navigation.
Parameters:
enabled(Boolean):
Returns: TabPanelWidget
public TabPanelWidget Paging(bool enabled = true)Selector(bool)
Enables or disables the dropdown selector for quick tab navigation.
Parameters:
enabled(Boolean):
Returns: TabPanelWidget
public TabPanelWidget Selector(bool enabled = true)TabsOnBottom()
Sets the tab position to bottom.
Returns: TabPanelWidget
public TabPanelWidget TabsOnBottom()TabsOnTop()
Sets the tab position to top.
Returns: TabPanelWidget
public TabPanelWidget TabsOnTop()Fields
Click
Rebindable action: Select tab or scroll via mouse click.
Returns: ActionId
public static readonly ActionId ClickNextFocusable
Rebindable action: Focus next focusable element.
Returns: ActionId
public static readonly ActionId NextFocusableNextTab
Rebindable action: Switch to next tab.
Returns: ActionId
public static readonly ActionId NextTabPreviousFocusable
Rebindable action: Focus previous focusable element.
Returns: ActionId
public static readonly ActionId PreviousFocusablePreviousTab
Rebindable action: Switch to previous tab.
Returns: ActionId
public static readonly ActionId PreviousTabScrollTabsLeft
Rebindable action: Scroll tabs left via mouse wheel.
Returns: ActionId
public static readonly ActionId ScrollTabsLeftScrollTabsRight
Rebindable action: Scroll tabs right via mouse wheel.
Returns: ActionId
public static readonly ActionId ScrollTabsRightExamples
ctx.TabPanel(tp => [
tp.Tab("Overview", t => [t.Text("Overview content")]),
tp.Tab("Settings", t => [t.Text("Settings content")]).Selected(),
tp.Tab("Advanced", t => [t.Text("Advanced content")])
])