Interface IViewModelBase
- Namespace
- Blazing.Mvvm.ComponentModel
- Assembly
- Blazing.Mvvm.Base.dll
Represents a base interface for ViewModel classes in Blazing.Mvvm, supporting property change notification and lifecycle methods for Blazor Views.
public interface IViewModelBase : INotifyPropertyChanged, IDisposableImplements
Methods
NotifyStateChanged()
Notifies the View that its state has changed and a UI update may be required.
void NotifyStateChanged()OnAfterRender(bool)
Invoked when the View has been rendered.
void OnAfterRender(bool firstRender)Parameters
OnAfterRenderAsync(bool)
Asynchronously invoked when the View has been rendered.
Task OnAfterRenderAsync(bool firstRender)Parameters
Returns
OnInitialized()
Invoked when the View is initialized and has received its initial parameters.
void OnInitialized()OnInitializedAsync()
Asynchronously invoked when the View is initialized and has received its initial parameters.
Task OnInitializedAsync()Returns
OnParametersSet()
Invoked when the View has received parameters from its parent and parameter values have been set.
void OnParametersSet()OnParametersSetAsync()
Asynchronously invoked when the View has received parameters from its parent and parameter values have been set.
Task OnParametersSetAsync()Returns
ShouldRender()
Determines whether the View should render.
bool ShouldRender()Returns
- bool
-
trueif theViewshould render; otherwise,false.