Class MBButton
This is a general purpose Material Theme button, with provision for standard MB styling, leading and trailing icons and all standard Blazor events. Adds the "mdc-card__action--button" class when placed inside an MBCard.
Implements
Inherited Members
Namespace: Material.Blazor
Assembly: Material.Blazor.dll
Syntax
public class MBButton : ComponentFoundation, IDisposable
Properties
| Improve this Doc View SourceButtonStyle
The button's Material Theme style - see MBButtonStyle.
Overrides ButtonStyle, CardActionButtonStyle or DialogActionButtonStyle as relevant.
Declaration
public MBButtonStyle? ButtonStyle { get; set; }
Property Value
Type | Description |
---|---|
Nullable<MBButtonStyle> |
Density
The button's density.
Declaration
public MBDensity? Density { get; set; }
Property Value
Type | Description |
---|---|
Nullable<MBDensity> |
DialogAction
A string value to return from an MBDialog when this button is pressed.
Declaration
public string DialogAction { get; set; }
Property Value
Type | Description |
---|---|
String |
IconFoundry
The foundry to use for both leading and trailing icons.
IconFoundry="IconHelper.MIIcon()"
IconFoundry="IconHelper.FAIcon()"
IconFoundry="IconHelper.OIIcon()"
Overrides IconFoundryName
Declaration
public IMBIconFoundry IconFoundry { get; set; }
Property Value
Type | Description |
---|---|
IMBIconFoundry |
Label
The button's label.
Declaration
public string Label { get; set; }
Property Value
Type | Description |
---|---|
String |
LeadingIcon
The leading icon's name. No leading icon shown if not set.
Declaration
public string LeadingIcon { get; set; }
Property Value
Type | Description |
---|---|
String |
TouchTarget
Inclusion of touch target
Declaration
public bool? TouchTarget { get; set; }
Property Value
Type | Description |
---|---|
Nullable<Boolean> |
TrailingIcon
The trailing icon's name. No leading icon shown if not set.
Declaration
public string TrailingIcon { get; set; }
Property Value
Type | Description |
---|---|
String |
Methods
| Improve this Doc View SourceOnInitializedAsync()
Declaration
protected override async Task OnInitializedAsync()
Returns
Type | Description |
---|---|
Task |