Table of Contents

Class MBIconButtonToggle

Namespace
Material.Blazor
Assembly
Material.Blazor.dll

This is a general purpose Material Theme icon button toggle, with provision for standard MB styling, leading and trailing icons and all standard Blazor events. Adds the "mdc-card__action--icon" class when placed inside an MBCard.

public class MBIconButtonToggle : InputComponent<bool>, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Inheritance
MBIconButtonToggle
Implements
Inherited Members

Constructors

MBIconButtonToggle()

public MBIconButtonToggle()

Properties

BadgeExited

When true collapses the badge.

[Parameter]
public bool BadgeExited { get; set; }

Property Value

bool

BadgeStyle

The badge's style - see MBBadgeStyle, defaults to ValueBearing.

[Parameter]
public MBBadgeStyle BadgeStyle { get; set; }

Property Value

MBBadgeStyle

BadgeValue

The button's density.

[Parameter]
public string BadgeValue { get; set; }

Property Value

string

Density

The button's density.

[Parameter]
public MBDensity? Density { get; set; }

Property Value

MBDensity?

HasBadge

Determines whether the button has a badge - defaults to false.

[Parameter]
public bool HasBadge { get; set; }

Property Value

bool

IconFoundry

The foundry to use for both leading and trailing icons.

IconFoundry="IconHelper.MIIcon()"

IconFoundry="IconHelper.FAIcon()"

IconFoundry="IconHelper.OIIcon()"

Overrides IconFoundryName

[Parameter]
public IMBIconFoundry? IconFoundry { get; set; }

Property Value

IMBIconFoundry

IconOff

The off-state icon's name.

[Parameter]
public string IconOff { get; set; }

Property Value

string

IconOn

The on-state icon's name.

[Parameter]
public string IconOn { get; set; }

Property Value

string

TouchTarget

Inclusion of touch target

[Parameter]
public bool? TouchTarget { get; set; }

Property Value

bool?

Methods

BuildRenderTree(RenderTreeBuilder)

Renders the component to the supplied RenderTreeBuilder.

protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder RenderTreeBuilder

OnInitializedAsync()

protected override Task OnInitializedAsync()

Returns

Task

OnParametersSetAsync()

When overriding this, call await base.OnParametersSetAsync(); before any user code unless there is a very good reason not to.

protected override Task OnParametersSetAsync()

Returns

Task