Class MBCascadingDefaults
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
ButtonDensity
The default density for an MBButton, defaults to ThemeDensity if not explicitly set.
public MBDensity ButtonDensity { get; set; }
Property Value
ButtonStyle
public MBButtonStyle ButtonStyle { get; set; }
Property Value
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
CardStyle
public MBCardStyle CardStyle { get; set; }
Property Value
CheckboxDensity
The default density for an MBCheckbox, defaults to ThemeDensity if not explicitly set.
public MBDensity CheckboxDensity { get; set; }
Property Value
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
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
DataTableDensity
The default density for an MBDataTable<TItem>, defaults to ThemeDensity if not explicitly set.
public MBDensity DataTableDensity { get; set; }
Property Value
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
DatePickerDefaultMaxDate
The default maximum date MBDatePicker.
public DateTime DatePickerDefaultMaxDate { get; set; }
Property Value
DatePickerDefaultMinDate
The default minimum date MBDatePicker.
public DateTime DatePickerDefaultMinDate { get; set; }
Property Value
DateSelectionCriteria
The default date selection criteria for a MBDatePicker, initialized to AllowAll if not explicitly set.
public MBDateSelectionCriteria DateSelectionCriteria { get; set; }
Property Value
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
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
Disabled
The default disabled state.
public bool Disabled { get; set; }
Property Value
IconButtonDensity
The default density for an MBIconButton or MBIconButtonToggle, defaults to ThemeDensity if not explicitly set.
public MBDensity IconButtonDensity { get; set; }
Property Value
IconFARelativeSize
The default Font Awesome relative size, initialized to Regular if not explicitly set.
public MBIconFARelativeSize IconFARelativeSize { get; set; }
Property Value
IconFAStyle
The default Font Awesome style, initialized to Solid if not explicitly set.
public MBIconFAStyle IconFAStyle { get; set; }
Property Value
IconFoundryName
The default foundry name, initialized to MaterialIcons if not explicitly set.
public MBIconFoundryName IconFoundryName { get; set; }
Property Value
IconMITheme
The default Material Icons theme, initialized to Filled if not explicitly set.
public MBIconMITheme IconMITheme { get; set; }
Property Value
IconMSColor
The default icon color - DEPRECATED.
[Obsolete("Use CSS styling instead")]
public string IconMSColor { get; set; }
Property Value
IconMSFill
The default fill setting, initialized to true if not explicitly set.
public bool IconMSFill { get; set; }
Property Value
IconMSGradient
The default gradient setting, initialized to NormalEmphasis if not explicitly set.
public MBIconMSGradient IconMSGradient { get; set; }
Property Value
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
IconMSSize
The default size setting, initialized to Size24 if not explicitly set.
public MBIconMSSize IconMSSize { get; set; }
Property Value
IconMSStyle
The default style setting, initialized to Outlined if not explicitly set.
public MBIconMSStyle IconMSStyle { get; set; }
Property Value
IconMSWeight
The default weight setting, initialized to W400 if not explicitly set.
public MBIconMSWeight IconMSWeight { get; set; }
Property Value
ItemValidation
Defines how radio button groups and selects validate mismtatch between item lists and initial value.
public MBItemValidation ItemValidation { get; set; }
Property Value
ListSingleLineDensity
The default single line density for an MBList<TItem>, defaults to ThemeDensity if not explicitly set.
public MBDensity ListSingleLineDensity { get; set; }
Property Value
ListStyle
The default style for an MBList<TItem>, initialized to None if not explicitly set.
public MBListStyle ListStyle { get; set; }
Property Value
ListType
The default type for an MBList<TItem>, initialized to Regular if not explicitly set.
public MBListType ListType { get; set; }
Property Value
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
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
SelectDensity
The default density for an MBSelect<TItem>, defaults to ThemeDensity if not explicitly set.
public MBDensity SelectDensity { get; set; }
Property Value
SelectInputStyle
The default style for an MBSelect<TItem>, initialized to Outlined if not explicitly set.
public MBSelectInputStyle SelectInputStyle { get; set; }
Property Value
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
TabBarDensity
The default density for an MBTabBar<TItem>, defaults to ThemeDensity if not explicitly set.
public MBDensity TabBarDensity { get; set; }
Property Value
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
Remarks
Also applied to MBAutocompletePagedField<TItem>, MBAutocompleteSelectField<TItem>, 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.
public MBDensity TextFieldDensity { get; set; }
Property Value
TextInputStyle
The default style for an MBTextField or an MBTextArea, initialized to Outlined if not explicitly set.
public MBTextInputStyle TextInputStyle { get; set; }
Property Value
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.
public MBDensity ThemeDensity { get; set; }
Property Value
TouchTarget
Determines whether to apply touch targets for accessibility. Defaults to true.
public bool TouchTarget { get; set; }
Property Value
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
Methods
ShallowCopy()
Returns a shallow copy of the cascading defaults.
public MBCascadingDefaults ShallowCopy()