Class ViewModelBlade<TEntity>
Class ViewModelBlade. Implements the ViewModel Implements the IViewModelBlade
Inheritance
System.Object
ViewModelBlade<TEntity>
Implements
INotifyPropertyChanged
IDisposable
IDataErrorInfo
INotifyDataErrorInfo
Inherited Members
Namespace: ISynergy.Framework.Mvvm.ViewModels
Assembly: ISynergy.Framework.Mvvm.dll
Syntax
public abstract class ViewModelBlade<TEntity> : ViewModel, IViewModelBlade, IViewModel, IObservableClass, IBindable, ICleanup
Type Parameters
Name | Description |
---|---|
TEntity | The type of the t entity. |
Constructors
View SourceViewModelBlade(IContext, IBaseCommonServices, ILogger, Boolean)
Initializes a new instance of the ViewModelBlade<TEntity> class.
Declaration
protected ViewModelBlade(IContext context, IBaseCommonServices commonServices, ILogger logger, bool automaticValidation = false)
Parameters
Type | Name | Description |
---|---|---|
IContext | context | The context. |
IBaseCommonServices | commonServices | The common services. |
ILogger | logger | The logger factory. |
System.Boolean | automaticValidation |
Properties
View SourceIsDisabled
Gets or sets the IsDisabled property value.
Declaration
public bool IsDisabled { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
IsUpdate
Gets or sets the IsUpdate property value.
Declaration
public bool IsUpdate { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Owner
Gets or sets the Owner property value.
Declaration
public IViewModelBladeView Owner { get; set; }
Property Value
Type | Description |
---|---|
IViewModelBladeView | The owner. |
SelectedItem
Gets or sets the SelectedItem property value.
Declaration
public TEntity SelectedItem { get; set; }
Property Value
Type | Description |
---|---|
TEntity | The selected item. |
SubmitCommand
Gets the submit command.
Declaration
public AsyncRelayCommand SubmitCommand { get; }
Property Value
Type | Description |
---|---|
AsyncRelayCommand | The submit command. |
Methods
View SourceCleanup()
Declaration
public override void Cleanup()
Overrides
View SourceOnSubmitted(SubmitEventArgs<TEntity>)
Called when [submitted].
Declaration
protected virtual void OnSubmitted(SubmitEventArgs<TEntity> e)
Parameters
Type | Name | Description |
---|---|---|
SubmitEventArgs<TEntity> | e | The e. |
SubmitAsync(TEntity, Boolean)
Submits the asynchronous.
Declaration
public virtual Task SubmitAsync(TEntity e, bool validateUnderlayingProperties = true)
Parameters
Type | Name | Description |
---|---|---|
TEntity | e | The e. |
System.Boolean | validateUnderlayingProperties |
Returns
Type | Description |
---|---|
Task | Task. |
Events
View SourceSubmitted
Occurs when [submitted].
Declaration
public event EventHandler<SubmitEventArgs<TEntity>> Submitted
Event Type
Type | Description |
---|---|
EventHandler<SubmitEventArgs<TEntity>> |
Implements
INotifyPropertyChanged
IDisposable
IDataErrorInfo
INotifyDataErrorInfo
Extension Methods
CollectionExtensions.FromHierarchy<TSource>(TSource, Func<TSource, TSource>, Func<TSource, Boolean>)