Class ComponentFoundation
The base class for all Material.Blazor components.
public abstract class ComponentFoundation : ComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
- Inheritance
-
ComponentFoundation
- Implements
- Derived
- Inherited Members
Constructors
ComponentFoundation()
protected ComponentFoundation()
Properties
ActiveConditionalClasses
protected string ActiveConditionalClasses { get; }
Property Value
CascadingDefaults
[CascadingParameter]
protected MBCascadingDefaults CascadingDefaults { get; set; }
Property Value
Disabled
Indicates whether the component is disabled.
[Parameter]
public bool? Disabled { get; set; }
Property Value
- bool?
Tooltip
A markup capable tooltip.
[Parameter]
public string Tooltip { get; set; }
Property Value
UnmatchedAttributes
Gets or sets a collection of additional attributes that will be applied to the created element.
[Parameter(CaptureUnmatchedValues = true)]
public IReadOnlyDictionary<string, object> UnmatchedAttributes { get; set; }
Property Value
class
Additional CSS classes for the component.
[Parameter]
public string @class { get; set; }
Property Value
id
The HTML id attribute is used to specify a unique id for an HTML element.
You cannot have more than one element with the same id in an HTML document.
[Parameter]
public string id { get; set; }
Property Value
style
Additional CSS style for the component.
[Parameter]
public string style { get; set; }
Property Value
Methods
Dispose()
public void Dispose()
Dispose(bool)
protected virtual void Dispose(bool disposing)
Parameters
disposing
bool
OnAfterRender(bool)
Material.Blazor components descending from ComponentFoundation must not override "ComponentBase.OnAfterRender(bool)".
protected override sealed void OnAfterRender(bool firstRender)
Parameters
firstRender
bool
OnAfterRenderAsync(bool)
Material.Blazor components generally should not override this because it handles the case where components need
to be adjusted when inside an MBDialog
or MBCard
.
protected override Task OnAfterRenderAsync(bool firstRender)
Parameters
firstRender
bool
Returns
OnInitialized()
Material.Blazor components use "OnInitializedAsync()" only.
protected override sealed void OnInitialized()
OnParametersSet()
Material.Blazor components use OnParametersSetAsync() only.
protected override sealed void OnParametersSet()
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()