Table of Contents

Class MudExpansionPanels

Namespace
MudBlazor
Assembly
MudBlazor.dll

A container which manages MudExpansionPanel components such that when one panel is expanded the others are collapsed automatically.

public class MudExpansionPanels : MudComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IMudStateHasChanged
Inheritance
MudExpansionPanels
Implements
Inherited Members
Extension Methods

Constructors

MudExpansionPanels()

public MudExpansionPanels()

Properties

ChildContent

The content within this component.

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

Property Value

RenderFragment

Classname

protected string Classname { get; }

Property Value

string

Dense

Uses compact padding for all panels.

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

Property Value

bool

Remarks

Defaults to false.

Elevation

The size of the drop shadow.

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

Property Value

int

Remarks

Defaults to 1. A higher number creates a heavier drop shadow. Use a value of 0 for no shadow.

Gutters

Adds left and right padding to all panels.

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

Property Value

bool

Remarks

Defaults to true.

MultiExpansion

Allows multiple panels to be expanded at the same time.

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

Property Value

bool

Remarks

Defaults to false.

Outlined

Shows borders around each panel.

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

Property Value

bool

Remarks

Defaults to true.

Square

Uses square corners for the panel.

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

Property Value

bool

Remarks

Defaults to false. Can be overridden by Rounded.

Methods

BuildRenderTree(RenderTreeBuilder)

protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder RenderTreeBuilder

CollapseAllAsync()

Hides the content of all panels.

public Task CollapseAllAsync()

Returns

Task

CollapseAllExceptAsync(MudExpansionPanel)

Collapses all panels except the given one.

public Task CollapseAllExceptAsync(MudExpansionPanel panel)

Parameters

panel MudExpansionPanel

The panel to keep expanded.

Returns

Task

ExpandAllAsync()

Shows the content of all panels.

public Task ExpandAllAsync()

Returns

Task

UpdateAllAsync()

Refreshes the expansion state of all panels.

public Task UpdateAllAsync()

Returns

Task

See Also