Class MBCascadingDefaults
A class to be used as a cascading value setting defaults for your application.
Inherited Members
Namespace: Material.Blazor
Assembly: Material.Blazor.dll
Syntax
public class MBCascadingDefaults
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.
Properties
| Improve this Doc View SourceAllowedSplattableAttributes
Further attributes that can be set as allowable when ComponentFoundation performs unmatched attribute validation. Works with ConstrainSplattableAttributes.
Declaration
public IEnumerable<string> AllowedSplattableAttributes { get; set; }
Property Value
Type | Description |
---|---|
IEnumerable<String> |
ButtonDensity
The default density for an MBButton, defaults to ThemeDensity if not explicitly set.
Declaration
public MBDensity ButtonDensity { get; set; }
Property Value
Type | Description |
---|---|
MBDensity |
ButtonStyle
Declaration
public MBButtonStyle ButtonStyle { get; set; }
Property Value
Type | Description |
---|---|
MBButtonStyle |
CardActionButtonStyle
The default style for a card action button/MBButton in an MBCard, returns the value of ButtonStyle if not explicitly set.
Declaration
public MBButtonStyle CardActionButtonStyle { get; set; }
Property Value
Type | Description |
---|---|
MBButtonStyle |
CardStyle
Declaration
public MBCardStyle CardStyle { get; set; }
Property Value
Type | Description |
---|---|
MBCardStyle |
CheckboxDensity
The default density for an MBCheckbox, defaults to ThemeDensity if not explicitly set.
Declaration
public MBDensity CheckboxDensity { get; set; }
Property Value
Type | Description |
---|---|
MBDensity |
ConstrainSplattableAttributes
Determines whether ComponentFoundation should throw an exception for invalid
unmatched HTML attributes passed to a component. Works with
Declaration
public bool ConstrainSplattableAttributes { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
DataTableDensity
The default density for an MBDataTable<TItem>, defaults to ThemeDensity if not explicitly set.
Declaration
public MBDensity DataTableDensity { get; set; }
Property Value
Type | Description |
---|---|
MBDensity |
DateFormat
The default date format for an MBDatePicker, initialized to "D" (culture specific C# long date pattern) if not explicitly set.
Declaration
public string DateFormat { get; set; }
Property Value
Type | Description |
---|---|
String |
DatePickerDefaultMaxDate
The default maximum date MBDatePicker.
Declaration
public DateTime DatePickerDefaultMaxDate { get; set; }
Property Value
Type | Description |
---|---|
DateTime |
DatePickerDefaultMinDate
The default minimum date MBDatePicker.
Declaration
public DateTime DatePickerDefaultMinDate { get; set; }
Property Value
Type | Description |
---|---|
DateTime |
DateSelectionCriteria
The default date selection criteria for a MBDatePicker, initialized to AllowAll if not explicitly set.
Declaration
public MBDateSelectionCriteria DateSelectionCriteria { get; set; }
Property Value
Type | Description |
---|---|
MBDateSelectionCriteria |
DebounceInterval
The default debounce interval in milliseconds for a MBDebouncedTextField, initialized to 300 milliseconds if not explicitly set.
Declaration
public int DebounceInterval { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
DialogActionButtonStyle
The default style for a dialog action button/MBButton in an MBDialog, returns the value of ButtonStyle if not explicitly set.
Declaration
public MBButtonStyle DialogActionButtonStyle { get; set; }
Property Value
Type | Description |
---|---|
MBButtonStyle |
Disabled
The default disabled state.
Declaration
public bool Disabled { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
IconButtonDensity
The default density for an MBIconButton or MBIconButtonToggle, defaults to ThemeDensity if not explicitly set.
Declaration
public MBDensity IconButtonDensity { get; set; }
Property Value
Type | Description |
---|---|
MBDensity |
IconFARelativeSize
The default Font Awesome relative size, initialized to Regular if not explicitly set.
Declaration
public MBIconFARelativeSize IconFARelativeSize { get; set; }
Property Value
Type | Description |
---|---|
MBIconFARelativeSize |
IconFAStyle
The default Font Awesome style, initialized to Solid if not explicitly set.
Declaration
public MBIconFAStyle IconFAStyle { get; set; }
Property Value
Type | Description |
---|---|
MBIconFAStyle |
IconFoundryName
The default foundry name, initialized to MaterialIcons if not explicitly set.
Declaration
public MBIconFoundryName IconFoundryName { get; set; }
Property Value
Type | Description |
---|---|
MBIconFoundryName |
IconMITheme
The default Material Icons theme, initialized to Filled if not explicitly set.
Declaration
public MBIconMITheme IconMITheme { get; set; }
Property Value
Type | Description |
---|---|
MBIconMITheme |
ItemValidation
Defines how radio button groups and selects validate mismtatch between item lists and initial value.
Declaration
public MBItemValidation ItemValidation { get; set; }
Property Value
Type | Description |
---|---|
MBItemValidation |
ListSingleLineDensity
The default single line density for an MBList<TItem>, defaults to ThemeDensity if not explicitly set.
Declaration
public MBDensity ListSingleLineDensity { get; set; }
Property Value
Type | Description |
---|---|
MBDensity |
ListStyle
The default style for an MBList<TItem>, initialized to None if not explicitly set.
Declaration
public MBListStyle ListStyle { get; set; }
Property Value
Type | Description |
---|---|
MBListStyle |
ListType
The default type for an MBList<TItem>, initialized to Regular if not explicitly set.
Declaration
public MBListType ListType { get; set; }
Property Value
Type | Description |
---|---|
MBListType |
RadioButtonDensity
The default density for an MBRadioButton<TItem> or MBRadioButtonGroup<TItem>, defaults to ThemeDensity if not explicitly set.
Declaration
public MBDensity RadioButtonDensity { get; set; }
Property Value
Type | Description |
---|---|
MBDensity |
SelectDensity
The default density for an MBSelect<TItem>, defaults to ThemeDensity if not explicitly set.
Declaration
public MBDensity SelectDensity { get; set; }
Property Value
Type | Description |
---|---|
MBDensity |
SelectInputStyle
The default style for an MBSelect<TItem>, initialized to Filled if not explicitly set.
Declaration
public MBSelectInputStyle SelectInputStyle { get; set; }
Property Value
Type | Description |
---|---|
MBSelectInputStyle |
Remarks
Also applied to MBDatePicker.
SwitchDensity
The default density for an MBSwitch, defaults to ThemeDensity if not explicitly set.
Declaration
public MBDensity SwitchDensity { get; set; }
Property Value
Type | Description |
---|---|
MBDensity |
TabBarDensity
The default density for an MBTabBar<TItem>, defaults to ThemeDensity if not explicitly set.
Declaration
public MBDensity TabBarDensity { get; set; }
Property Value
Type | Description |
---|---|
MBDensity |
TextAlignStyle
The default text alignment style for an MBTextField, an MBTextArea or MBSelect<TItem>, initialized to Default if not explicitly set.
Declaration
public MBTextAlignStyle TextAlignStyle { get; set; }
Property Value
Type | Description |
---|---|
MBTextAlignStyle |
Remarks
Also applied to MBAutocompleteTextField, MBDebouncedTextField, MBNumericDoubleField and MBNumericIntField.
TextFieldDensity
The default density for an MBTextField, MBTextArea, MBAutocompleteTextField, MBDebouncedTextField, MBNumericDoubleField or MBNumericIntField, defaults to ThemeDensity if not explicitly set.
Declaration
public MBDensity TextFieldDensity { get; set; }
Property Value
Type | Description |
---|---|
MBDensity |
TextInputStyle
The default style for an MBTextField or an MBTextArea, initialized to Filled if not explicitly set.
Declaration
public MBTextInputStyle TextInputStyle { get; set; }
Property Value
Type | Description |
---|---|
MBTextInputStyle |
Remarks
Also applied to MBAutocompleteTextField, MBDebouncedTextField, MBNumericDoubleField and MBNumericIntField.
ThemeDensity
The default density for an all components. Any individual component density that is set overrides theme density.
Declaration
public MBDensity ThemeDensity { get; set; }
Property Value
Type | Description |
---|---|
MBDensity |
TouchTarget
Determines whether to apply touch targets for accessibility. Defaults to true.
Declaration
public bool TouchTarget { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Version
Gets incremented for every property update. Use Version to force Blazor to re-render components or <div>
blocks
with the @key
attribute.
Declaration
public int Version { get; }
Property Value
Type | Description |
---|---|
Int32 |
Methods
| Improve this Doc View SourceShallowCopy()
Returns a shallow copy of the cascading defaults.
Declaration
public MBCascadingDefaults ShallowCopy()
Returns
Type | Description |
---|---|
MBCascadingDefaults |