Table of Contents

Class MBCascadingDefaults

Namespace
Material.Blazor
Assembly
Material.Blazor.dll

A class to be used as a cascading value setting defaults for your application.

public class MBCascadingDefaults
Inheritance
MBCascadingDefaults
Inherited Members

Remarks

For example the default style for a material button is Text, however you can change that by setting ButtonStyle to another value and your whole application within the cascading value will change appearance. You can of course nest cascading values in the normal manner. Exposes a property Version that is incremented each time another property is updated; Version can be used with an @key(CascadingDefaults.Version) attribute to force components to re-render when cascading defaults have updated. See https://material-blazor.com/docs/articles/CascadingDefaults.html.

Constructors

MBCascadingDefaults()

public MBCascadingDefaults()

Properties

AllowedSplattableAttributes

Further attributes that can be set as allowable when ComponentFoundation performs unmatched attribute validation. Works with ConstrainSplattableAttributes.

public IEnumerable<string> AllowedSplattableAttributes { get; set; }

Property Value

IEnumerable<string>

ButtonDensity

The default density for an MBButton, defaults to ThemeDensity if not explicitly set.

public MBDensity ButtonDensity { get; set; }

Property Value

MBDensity

ButtonStyle

The default style for an MBButton, initialized to Text if not explicitly set.

public MBButtonStyle ButtonStyle { get; set; }

Property Value

MBButtonStyle

CardActionButtonStyle

The default style for a card action button/MBButton in an MBCard, returns the value of ButtonStyle if not explicitly set.

public MBButtonStyle CardActionButtonStyle { get; set; }

Property Value

MBButtonStyle

CardStyle

The default style for an MBCard, initialized to Default if not explicitly set.

public MBCardStyle CardStyle { get; set; }

Property Value

MBCardStyle

CheckboxDensity

The default density for an MBCheckbox, defaults to ThemeDensity if not explicitly set.

public MBDensity CheckboxDensity { get; set; }

Property Value

MBDensity

ConstrainSplattableAttributes

Determines whether ComponentFoundation should throw an exception for invalid unmatched HTML attributes passed to a component. and AllowedSplattableAttributes

public bool ConstrainSplattableAttributes { get; set; }

Property Value

bool

CultureInfo

The CultureInfo to be used by components when formatting values such as numerics or dates. Defaults to CurrentCulture.

public CultureInfo CultureInfo { get; set; }

Property Value

CultureInfo

DataTableDensity

The default density for an MBDataTable<TItem>, defaults to ThemeDensity if not explicitly set.

public MBDensity DataTableDensity { get; set; }

Property Value

MBDensity

DateFormat

The default date format for an MBDatePicker, initialized to "D" (culture specific C# long date pattern) if not explicitly set.

public string DateFormat { get; set; }

Property Value

string

DatePickerDefaultMaxDate

The default maximum date MBDatePicker.

public DateTime DatePickerDefaultMaxDate { get; set; }

Property Value

DateTime

DatePickerDefaultMinDate

The default minimum date MBDatePicker.

public DateTime DatePickerDefaultMinDate { get; set; }

Property Value

DateTime

DateSelectionCriteria

The default date selection criteria for a MBDatePicker, initialized to AllowAll if not explicitly set.

public MBDateSelectionCriteria DateSelectionCriteria { get; set; }

Property Value

MBDateSelectionCriteria

DebounceInterval

The default debounce interval in milliseconds for a MBDebouncedTextField, initialized to 300 milliseconds if not explicitly set.

public int DebounceInterval { get; set; }

Property Value

int

DialogActionButtonStyle

The default style for a dialog action button/MBButton in an MBDialog, returns the value of ButtonStyle if not explicitly set.

public MBButtonStyle DialogActionButtonStyle { get; set; }

Property Value

MBButtonStyle

Disabled

The default disabled state.

public bool Disabled { get; set; }

Property Value

bool

IconButtonDensity

The default density for an MBIconButton or MBIconButtonToggle, defaults to ThemeDensity if not explicitly set.

public MBDensity IconButtonDensity { get; set; }

Property Value

MBDensity

IconFARelativeSize

The default Font Awesome relative size, initialized to Regular if not explicitly set.

public MBIconFARelativeSize IconFARelativeSize { get; set; }

Property Value

MBIconFARelativeSize

IconFAStyle

The default Font Awesome style, initialized to Solid if not explicitly set.

public MBIconFAStyle IconFAStyle { get; set; }

Property Value

MBIconFAStyle

IconFoundryName

The default foundry name, initialized to MaterialIcons if not explicitly set.

public MBIconFoundryName IconFoundryName { get; set; }

Property Value

MBIconFoundryName

IconMITheme

The default Material Icons theme, initialized to Filled if not explicitly set.

public MBIconMITheme IconMITheme { get; set; }

Property Value

MBIconMITheme

IconMSColor

The default icon color - DEPRECATED.

[Obsolete("Use CSS styling instead")]
public string IconMSColor { get; set; }

Property Value

string

IconMSFill

The default fill setting, initialized to true if not explicitly set.

public bool IconMSFill { get; set; }

Property Value

bool

IconMSGradient

The default gradient setting, initialized to NormalEmphasis if not explicitly set.

public MBIconMSGradient IconMSGradient { get; set; }

Property Value

MBIconMSGradient

IconMSName

The default gradient setting, initialized to "priority_high" if not explicitly set, thus showing a large exclamation mark as a placeholder icon.

public string IconMSName { get; set; }

Property Value

string

IconMSSize

The default size setting, initialized to Size24 if not explicitly set.

public MBIconMSSize IconMSSize { get; set; }

Property Value

MBIconMSSize

IconMSStyle

The default style setting, initialized to Outlined if not explicitly set.

public MBIconMSStyle IconMSStyle { get; set; }

Property Value

MBIconMSStyle

IconMSWeight

The default weight setting, initialized to W400 if not explicitly set.

public MBIconMSWeight IconMSWeight { get; set; }

Property Value

MBIconMSWeight

ItemValidation

Defines how radio button groups and selects validate mismtatch between item lists and initial value.

public MBItemValidation ItemValidation { get; set; }

Property Value

MBItemValidation

ListSingleLineDensity

The default single line density for an MBList<TItem>, defaults to ThemeDensity if not explicitly set.

public MBDensity ListSingleLineDensity { get; set; }

Property Value

MBDensity

ListStyle

The default style for an MBList<TItem>, initialized to None if not explicitly set.

public MBListStyle ListStyle { get; set; }

Property Value

MBListStyle

ListType

The default type for an MBList<TItem>, initialized to Regular if not explicitly set.

public MBListType ListType { get; set; }

Property Value

MBListType

PaginatorItemsPerPageFormatter

The delegate used to format paginator items per page text.

public Func<int, CultureInfo, string> PaginatorItemsPerPageFormatter { get; set; }

Property Value

Func<int, CultureInfo, string>

PaginatorPositionFormatter

The delegate used to format paginator position text.

public Func<int, int, int, CultureInfo, string> PaginatorPositionFormatter { get; set; }

Property Value

Func<int, int, int, CultureInfo, string>

RadioButtonDensity

The default density for an MBRadioButton<TItem> or MBRadioButtonGroup<TItem>, defaults to ThemeDensity if not explicitly set.

public MBDensity RadioButtonDensity { get; set; }

Property Value

MBDensity

SelectDensity

The default density for an MBSelect<TItem>, defaults to ThemeDensity if not explicitly set.

public MBDensity SelectDensity { get; set; }

Property Value

MBDensity

SelectInputStyle

The default style for an MBSelect<TItem>, initialized to Outlined if not explicitly set.

public MBSelectInputStyle SelectInputStyle { get; set; }

Property Value

MBSelectInputStyle

Remarks

Also applied to MBDatePicker.

SwitchDensity

The default density for an MBSwitch, defaults to ThemeDensity if not explicitly set.

public MBDensity SwitchDensity { get; set; }

Property Value

MBDensity

TabBarDensity

The default density for an MBTabBar<TItem>, defaults to ThemeDensity if not explicitly set.

public MBDensity TabBarDensity { get; set; }

Property Value

MBDensity

TextAlignStyle

The default text alignment style for an MBTextField, an MBTextArea or MBSelect<TItem>, initialized to Default if not explicitly set.

public MBTextAlignStyle TextAlignStyle { get; set; }

Property Value

MBTextAlignStyle

Remarks

TextFieldDensity

The default density for an MBTextField, MBTextArea, MBAutocompleteTextField, MBDebouncedTextField, MBNumericDoubleField or MBNumericIntField, defaults to ThemeDensity if not explicitly set.

public MBDensity TextFieldDensity { get; set; }

Property Value

MBDensity

TextInputStyle

The default style for an MBTextField or an MBTextArea, initialized to Outlined if not explicitly set.

public MBTextInputStyle TextInputStyle { get; set; }

Property Value

MBTextInputStyle

Remarks

ThemeDensity

The default density for an all components. Any individual component density that is set overrides theme density.

public MBDensity ThemeDensity { get; set; }

Property Value

MBDensity

TouchTarget

Determines whether to apply touch targets for accessibility. Defaults to true.

public bool TouchTarget { get; set; }

Property Value

bool

Version

Gets incremented for every property update. Use Version to force Blazor to re-render components or <div> blocks with the @key attribute.

public int Version { get; }

Property Value

int

Methods

ShallowCopy()

Returns a shallow copy of the cascading defaults.

public MBCascadingDefaults ShallowCopy()

Returns

MBCascadingDefaults