Class ViewModelBase
Base class for ViewModels.
Inheritance
ViewModelBase
Implements
Namespace: Sartorius.SAF.Presentation.Infrastructure
Assembly: Sartorius.SAF.Presentation.dll
Syntax
public abstract class ViewModelBase : ChangeTrackingObject, INotifyPropertyChanged, IDataErrorInfo, INotifyDataErrorInfo, INotifyDataPropertyChanged, IActiveAware, IClosingAware, IBusyAware
Properties
View SourceIsActive
Gets or sets a value indicating whether this instance is active. Interplay with Prism’s RegionActiveAwareBehavior
Declaration
public bool IsActive { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
|
IsBusy
Indicates whether the instance is busy.
Declaration
public bool IsBusy { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Methods
View SourceOnClosing()
Performs actions when the instance is closed.
Declaration
public virtual void OnClosing()
RaiseIsActiveChanged(EventArgs)
Invokes the is active changed event.
Declaration
protected virtual void RaiseIsActiveChanged(EventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| EventArgs | e | The EventArgs instance containing the event data. |
RaiseIsBusyChanged()
Raises the IsBusyChanged event
Declaration
protected virtual void RaiseIsBusyChanged()
SetCommandsStates(bool)
Sets the commands states.
Declaration
protected virtual void SetCommandsStates(bool value)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | value | if set to |
Events
View SourceIsActiveChanged
Occurs when active status changed.
Declaration
public event EventHandler IsActiveChanged
Event Type
| Type | Description |
|---|---|
| EventHandler |
IsBusyChanged
Raised when IsBusy changed.
Declaration
public event EventHandler IsBusyChanged
Event Type
| Type | Description |
|---|---|
| EventHandler |