Class MudTabPanel
- Namespace
- MudBlazor
- Assembly
- MudBlazor.dll
A tab as part of a MudTabs or MudDynamicTabs component.
public class MudTabPanel : MudComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IMudStateHasChanged, IAsyncDisposable
- Inheritance
-
MudTabPanel
- Implements
- Inherited Members
- Extension Methods
Constructors
MudTabPanel()
public MudTabPanel()
Fields
PanelRef
The reference to the underlying panel element.
public ElementReference PanelRef
Field Value
Properties
BadgeColor
The color of the badge.
[Parameter]
[Category("Appearance")]
public Color BadgeColor { get; set; }
Property Value
Remarks
BadgeData
The badge shown for this tab.
[Parameter]
[Category("Behavior")]
public object? BadgeData { get; set; }
Property Value
Remarks
Defaults to null
. Typically a string such as "3"
or "live"
.
BadgeDot
Shows a dot instead of text or icon for the badge.
[Parameter]
[Category("Behavior")]
public bool BadgeDot { get; set; }
Property Value
Remarks
Defaults to false
. When true
, a dot instead of BadgeData is displayed.
BadgeIcon
Optional icon to be shown in the badge instead of text.
[Parameter]
[Category("Behavior")]
public string? BadgeIcon { get; set; }
Property Value
ChildContent
The content within this tab.
[Parameter]
[Category("Behavior")]
public RenderFragment? ChildContent { get; set; }
Property Value
Disabled
Prevents the user from interacting with this panel.
[Parameter]
[Category("Behavior")]
public bool Disabled { get; set; }
Property Value
Remarks
Defaults to false
.
ID
The unique ID for this panel.
[Parameter]
[Category("Behavior")]
public object? ID { get; set; }
Property Value
Remarks
Defaults to null
. Should be unique across tabs.
Useful for activating tabs manually via the ActivatePanel
method of the MudTabs and
MudDynamicTabs components.
Icon
The icon for this tab.
[Parameter]
[Category("Behavior")]
public string? Icon { get; set; }
Property Value
Remarks
Defaults to null
.
IconColor
The color of this tab's icon.
[Parameter]
[Category("Behavior")]
public Color IconColor { get; set; }
Property Value
Remarks
OnClick
Occurs when this tab is clicked.
[Parameter]
public EventCallback<MouseEventArgs> OnClick { get; set; }
Property Value
ShowCloseIcon
For dynamic tabs, shows a "Close" icon for this tab.
[Parameter]
[Category("Behavior")]
public bool ShowCloseIcon { get; set; }
Property Value
Remarks
Defaults to true
. Only applies within a MudDynamicTabs component.
Stylename
protected string Stylename { get; }
Property Value
TabContent
The content within this tab's title.
[Parameter]
[Category("Behavior")]
public RenderFragment? TabContent { get; set; }
Property Value
Remarks
Defaults to null
. Typically used to display more than just text in the title.
For basic text, use the Text parameter.
TabWrapperContent
The content enclosing this tab.
[Parameter]
[Category("Behavior")]
public RenderFragment<RenderFragment>? TabWrapperContent { get; set; }
Property Value
Remarks
Defaults to null
. Typically used to wrap the entire tab content in other content, such
as a MudTooltip, which wraps the content they refer to.
Text
The title of this tab panel.
[Parameter]
[Category("Behavior")]
public string? Text { get; set; }
Property Value
Remarks
Defaults to null
. Only applies when TabContent is not set.
ToolTip
The tooltip displayed for this tab.
[Parameter]
[Category("Behavior")]
public string? ToolTip { get; set; }
Property Value
Remarks
Defaults to null
. Only applies when TabContent is not set.
Visible
Shows the tab.
[Parameter]
[Category("Behavior")]
public bool Visible { get; set; }
Property Value
Remarks
Defaults to true
.
Methods
BuildRenderTree(RenderTreeBuilder)
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
__builder
RenderTreeBuilder
DisposeAsync()
public ValueTask DisposeAsync()
Returns
OnAfterRenderAsync(bool)
protected override Task OnAfterRenderAsync(bool firstRender)
Parameters
firstRender
bool
Returns
OnInitialized()
protected override void OnInitialized()