Table of Contents

Class MudTabs

Namespace
MudBlazor
Assembly
MudBlazor.dll
public class MudTabs : MudComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IMudStateHasChanged, IAsyncDisposable
Inheritance
MudTabs
Implements
Derived
Inherited Members
Extension Methods

Constructors

MudTabs()

public MudTabs()

Properties

ActivePanel

public MudTabPanel ActivePanel { get; }

Property Value

MudTabPanel

ActivePanelIndex

The current active panel index. Also with Bidirectional Binding

[Parameter]
[Category("Behavior")]
public int ActivePanelIndex { get; set; }

Property Value

int

ActivePanelIndexChanged

Fired when ActivePanelIndex changes.

[Parameter]
public EventCallback<int> ActivePanelIndexChanged { get; set; }

Property Value

EventCallback<int>

ActiveTabClass

Custom class/classes for the active tab

[Parameter]
[Category("Appearance")]
public string ActiveTabClass { get; set; }

Property Value

string

AlwaysShowScrollButtons

If true, always display the scroll buttons even if the tabs are smaller than the required with, buttons will be disabled if there is nothing to scroll.

[Parameter]
[Category("Appearance")]
public bool AlwaysShowScrollButtons { get; set; }

Property Value

bool

ApplyEffectsToContainer

If true, will apply elevation, rounded, outlined effects to the whole tab component instead of just tabHeader.

[Parameter]
[Category("Appearance")]
public bool ApplyEffectsToContainer { get; set; }

Property Value

bool

Border

If true, sets a border between the content and the tabHeader depending on the position.

[Parameter]
[Category("Appearance")]
public bool Border { get; set; }

Property Value

bool

Centered

If true, centers the tabitems.

[Parameter]
[Category("Appearance")]
public bool Centered { get; set; }

Property Value

bool

ChildContent

Child content of component.

[Parameter]
[Category("Behavior")]
public RenderFragment ChildContent { get; set; }

Property Value

RenderFragment

Color

The color of the component. It supports the theme colors.

[Parameter]
[Category("Appearance")]
public Color Color { get; set; }

Property Value

Color

Elevation

The higher the number, the heavier the drop-shadow, applies around the whole component.

[Parameter]
[Category("Appearance")]
public int Elevation { get; set; }

Property Value

int

Header

A render fragment that is added before or after (based on the value of HeaderPosition) the tabs inside the header panel of the tab control

[Parameter]
[Category("Behavior")]
public RenderFragment<MudTabs> Header { get; set; }

Property Value

RenderFragment<MudTabs>

HeaderPosition

Additional content specified by Header is placed either before the tabs, after or not at all

[Parameter]
[Category("Behavior")]
public TabHeaderPosition HeaderPosition { get; set; }

Property Value

TabHeaderPosition

HideSlider

Hides the active tab slider.

[Parameter]
[Category("Appearance")]
public bool HideSlider { get; set; }

Property Value

bool

IconColor

The color of the icon. It supports the theme colors.

[Parameter]
[Category("Appearance")]
public Color IconColor { get; set; }

Property Value

Color

InternalClassName

Can be used in derived class to add a class to the main container. If not overwritten return an empty string

protected virtual string InternalClassName { get; }

Property Value

string

KeepPanelsAlive

If true, render all tabs and hide (display:none) every non-active.

[Parameter]
[Category("Behavior")]
public bool KeepPanelsAlive { get; set; }

Property Value

bool

MaxHeight

Sets the maxheight the component can have.

[Parameter]
[Category("Appearance")]
public int? MaxHeight { get; set; }

Property Value

int?

MaxHeightStyles

protected string MaxHeightStyles { get; }

Property Value

string

MinimumTabWidth

Sets the min-wdth of the tabs. 160px by default.

[Parameter]
[Category("Appearance")]
public string MinimumTabWidth { get; set; }

Property Value

string

NextIcon

Icon to use for right pagination.

[Parameter]
[Category("Appearance")]
public string NextIcon { get; set; }

Property Value

string

OnPreviewInteraction

Fired when a panel gets activated. Returned Task will be awaited.

[Parameter]
[Category("Behavior")]
public Func<TabInteractionEventArgs, Task> OnPreviewInteraction { get; set; }

Property Value

Func<TabInteractionEventArgs, Task>

Outlined

If true, tabHeader will be outlined.

[Parameter]
[Category("Appearance")]
public bool Outlined { get; set; }

Property Value

bool

PanelClass

Custom class/classes for Selected Content Panel

[Parameter]
[Category("Appearance")]
public string PanelClass { get; set; }

Property Value

string

Panels

A readonly list of the current panels. Panels should be added or removed through the RenderTree use this collection to get informations about the current panels

public IReadOnlyList<MudTabPanel> Panels { get; }

Property Value

IReadOnlyList<MudTabPanel>

PanelsClassnames

protected string PanelsClassnames { get; }

Property Value

string

Position

Sets the position of the tabs itself.

[Parameter]
[Category("Behavior")]
public Position Position { get; set; }

Property Value

Position

PrePanelContent

This fragment is placed between tabHeader and panels. It can be used to display additional content like an address line in a browser. The active tab will be the content of this RenderFragement

[Parameter]
[Category("Behavior")]
public RenderFragment<MudTabPanel> PrePanelContent { get; set; }

Property Value

RenderFragment<MudTabPanel>

PrevIcon

Icon to use for left pagination.

[Parameter]
[Category("Appearance")]
public string PrevIcon { get; set; }

Property Value

string

RightToLeft

[CascadingParameter(Name = "RightToLeft")]
public bool RightToLeft { get; set; }

Property Value

bool

Ripple

Gets or sets whether to show a ripple effect when the user clicks the button. Default is true.

[Parameter]
[Category("Appearance")]
public bool Ripple { get; set; }

Property Value

bool

Rounded

If true, sets the border-radius to theme default.

[Parameter]
[Category("Appearance")]
public bool Rounded { get; set; }

Property Value

bool

ScrollIconColor

The color of the next/prev icons. It supports the theme colors.

[Parameter]
[Category("Appearance")]
public Color ScrollIconColor { get; set; }

Property Value

Color

SliderAnimation

If true, displays slider animation

[Parameter]
[Category("Appearance")]
public bool SliderAnimation { get; set; }

Property Value

bool

SliderClass

protected string SliderClass { get; }

Property Value

string

SliderColor

The color of the tab slider. It supports the theme colors.

[Parameter]
[Category("Appearance")]
public Color SliderColor { get; set; }

Property Value

Color

SliderStyle

protected string SliderStyle { get; }

Property Value

string

TabBarClassnames

protected string TabBarClassnames { get; }

Property Value

string

TabHeaderClass

Custom class/classes for TabHeader

[Parameter]
[Category("Appearance")]
public string TabHeaderClass { get; set; }

Property Value

string

TabPanelClass

Custom class/classes for TabPanel

[Parameter]
[Category("Appearance")]
public string TabPanelClass { get; set; }

Property Value

string

TabPanelHeader

A render fragment that is added before or after (based on the value of HeaderPosition) inside each tab panel

[Parameter]
[Category("Behavior")]
public RenderFragment<MudTabPanel> TabPanelHeader { get; set; }

Property Value

RenderFragment<MudTabPanel>

TabPanelHeaderPosition

Additional content specified by Header is placed either before the tabs, after or not at all

[Parameter]
[Category("Behavior")]
public TabHeaderPosition TabPanelHeaderPosition { get; set; }

Property Value

TabHeaderPosition

TabsClassnames

protected string TabsClassnames { get; }

Property Value

string

WrapperClassnames

protected string WrapperClassnames { get; }

Property Value

string

WrapperScrollStyle

protected string WrapperScrollStyle { get; }

Property Value

string

Methods

ActivatePanel(MudTabPanel, bool)

public void ActivatePanel(MudTabPanel panel, bool ignoreDisabledState = false)

Parameters

panel MudTabPanel
ignoreDisabledState bool

ActivatePanel(int, bool)

public void ActivatePanel(int index, bool ignoreDisabledState = false)

Parameters

index int
ignoreDisabledState bool

ActivatePanel(object, bool)

public void ActivatePanel(object id, bool ignoreDisabledState = false)

Parameters

id object
ignoreDisabledState bool

BuildRenderTree(RenderTreeBuilder)

protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder RenderTreeBuilder

DisposeAsync()

public ValueTask DisposeAsync()

Returns

ValueTask

OnAfterRenderAsync(bool)

protected override Task OnAfterRenderAsync(bool firstRender)

Parameters

firstRender bool

Returns

Task

OnInitialized()

protected override void OnInitialized()

OnParametersSet()

protected override void OnParametersSet()