Property | Type | Description | |
---|---|---|---|
Cancel | Task |
||
CancelAndCloseViewModel | Task |
||
CancelViewModel | Task |
||
Close | Task | ||
CloseViewModel | Task | ||
DeserializeFromTombstoning | void | ||
INotifyableViewModel | void | ||
INotifyableViewModel | void | ||
INotifyableViewModel | void | ||
IRelationalViewModel | void | ||
Initialize | Task | ||
InitializeModelInternal | void | ||
InitializePropertiesWithAttributes | void | ||
InitializeThrottling | void | ||
InitializeViewModel | Task | ||
InitializeViewModelMetaData | Catel.MVVM.ViewModelMetadata | ||
OnChildViewModelClosed | void | ||
OnChildViewModelPropertyChanged | void | ||
OnClosed | void | ||
OnClosing | void | ||
OnModelErrorInfoUpdated | void | ||
OnModelPropertyChangedInternal | void | ||
OnThrottlingTimerTick | void | ||
PrepareForTombstoneStateInternal | void | ||
RecoverFromTombstoneStateInternal | void | ||
Save | Task |
||
SaveAndCloseViewModel | Task |
||
SaveViewModel | Task |
||
SerializeForTombstoning | byte[] | ||
UninitializeModelInternal | void | ||
UninitializeThrottling | void | ||
ValidateViewModelToModelMappings | void | ||
ViewModelBase | System |
Method | Description | |
---|---|---|
CancelViewModelAsync ( ) : Task |
Cancels the editing of the data.
|
|
CloseViewModelAsync ( bool result ) : Task |
Closes this instance. Always called after the Cancel of Save method.
|
|
InitializeViewModelAsync ( ) : Task |
Initializes the view model. Normally the initialization is done in the constructor, but sometimes this must be delayed to a state where the associated UI element (user control, window, ...) is actually loaded. It's not recommended to implement the initialization of properties in this method. The initialization of properties should be done in the constructor. This method should be used to start the retrieval of data from a web service or something similar. |
|
SaveViewModelAsync ( ) : Task |
Saves the data.
|
|
ToString ( ) : string |
Converts the object to a string.
|
|
ValidateViewModel ( bool force = false, bool notifyChangedPropertiesOnly = true ) : bool |
Validates the specified notify changed properties only. This method is useful when the view model is initialized before the window, and therefore WPF does not update the errors and warnings. |
Method | Description | |
---|---|---|
CancelAsync ( ) : Task |
Cancels the editing of the data.
|
|
CloseAsync ( ) : Task |
Closes this instance. Always called after the Cancel of Save method.
|
|
GetAllModels ( ) : object[] |
Gets all models that are decorated with the ModelAttribute.
|
|
GetChildViewModels ( ) : IEnumerable |
Gets the child view models of this view model.
|
|
InitializeAsync ( ) : Task |
Initializes the view model. Normally the initialization is done in the constructor, but sometimes this must be delayed to a state where the associated UI element (user control, window, ...) is actually loaded. It's not recommended to implement the initialization of properties in this method. The initialization of properties should be done in the constructor. This method should be used to start the retrieval of data from a web service or something similar. |
|
InitializeModel ( string modelProperty, object model ) : void |
Called when a model initialized.
|
|
InitializeViewModelAttributes ( ) : void |
Initializes the view model attributes, such as the ModelAttribute and ViewModelToModelAttribute.
|
|
IsModelRegistered ( string name ) : bool |
Determines whether a specific property is registered as a model.
|
|
OnClosedAsync ( bool result ) : Task |
Called when the view model has just been closed.
|
|
OnClosingAsync ( ) : Task |
Called when the view model is about to be closed.
|
|
OnModelPropertyChanged ( object sender, |
Called when a property on one of the registered models has changed. This method will also raise for properties that are not mapped on the view model. |
|
OnPropertyChanged ( AdvancedPropertyChangedEventArgs e ) : void |
Called when a property value has changed.
|
|
OnValidated ( IValidationContext validationContext ) : void |
Called when the object is validated.
|
|
OnValidating ( IValidationContext validationContext ) : void |
Called when the object is validating.
|
|
OnValidatingBusinessRules ( IValidationContext validationContext ) : void |
Called when the object is validating the business rules.
|
|
OnValidatingFields ( IValidationContext validationContext ) : void |
Called when the object is validating the fields.
|
|
OnViewModelCommandExecuted ( IViewModel viewModel, ICatelCommand command, object commandParameter ) : void |
Called when a command for a view model type that the current view model is interested in has been executed. This can be accomplished by decorating the view model with the InterestedInAttribute.
|
|
OnViewModelEvent ( IViewModel viewModel, ViewModelEvent viewModelEvent, |
Called when an event for a view model type that the current view model is interested in has been raised. This can be accomplished by decorating the view model with the InterestedInAttribute.
|
|
OnViewModelPropertyChanged ( IViewModel viewModel, string propertyName ) : void |
Called when a property has changed for a view model type that the current view model is interested in. This can be accomplished by decorating the view model with the InterestedInAttribute.
|
|
PrepareForTombstoneState ( object>.IDictionary |
Prepares the state for tombstoning.
|
|
RaisePropertyChanged ( object sender, AdvancedPropertyChangedEventArgs e ) : void |
Raises the ObservableObject.PropertyChanged event.
|
|
RecoverFromTombstoneState ( object>.IDictionary |
Recovers the state from tombstoning.
|
|
RegisterViewModelServices ( IServiceLocator serviceLocator ) : void |
Registers the default view model services.
|
|
ResetModel ( string modelProperty, ModelCleanUpMode modelCleanUpMode ) : void |
Resets the model by calling uninitializing and initializing the model again. This means that if the model supports IEditableObject, it will be reset.
|
|
SaveAsync ( ) : Task |
Saves the data.
|
|
UninitializeModel ( string modelProperty, object model, ModelCleanUpMode modelCleanUpMode ) : void |
Called when a model uninitialized.
|
|
UpdateExplicitViewModelToModelMappings ( ) : void |
Updates the view model to model mappings that are defined as ViewModelToModelMode.Explicit.
|
|
ViewModelBase ( IServiceLocator serviceLocator, bool supportIEditableObject = true, bool ignoreMultipleModelsWarning = false, bool skipViewModelAttributesInitialization = false ) : System |
Initializes a new instance of the ViewModelBase class.
|
|
ViewModelBase ( bool supportIEditableObject, bool ignoreMultipleModelsWarning = false, bool skipViewModelAttributesInitialization = false ) : System |
Initializes a new instance of the ViewModelBase class.
|
Method | Description | |
---|---|---|
Cancel ( ) : Task |
||
CancelAndCloseViewModel ( ) : Task |
||
CancelViewModel ( ) : Task |
||
Close ( ) : Task | ||
CloseViewModel ( bool result ) : Task | ||
DeserializeFromTombstoning ( byte data ) : void |
Deserializes the data from a previously stored tombstoning state.
|
|
INotifyableViewModel ( IViewModel viewModel, ICatelCommand command, object commandParameter ) : void |
Called when a command for a view model type that the current view model is interested in has been executed. This can be accomplished by decorating the view model with the InterestedInAttribute. This method should only be called by Catel so the ManagedViewModel can invoke it. This method is only used as a pass-through to the actual OnViewModelCommandExecuted method. |
|
INotifyableViewModel ( IViewModel viewModel, ViewModelEvent viewModelEvent, |
Views the model event. This method should only be called by Catel so the ManagedViewModel can invoke it. This method is only used as a pass-through to the actual OnViewModelEvent method. |
|
INotifyableViewModel ( IViewModel viewModel, string propertyName ) : void |
Called when a property has changed for a view model type that the current view model is interested in. This can be accomplished by decorating the view model with the InterestedInAttribute. This method should only be called by Catel so the ManagedViewModel can invoke it. This method is only used as a pass-through to the actual OnViewModelPropertyChanged method. |
|
IRelationalViewModel ( IViewModel parentViewModel ) : void |
Sets the new parent view model of this view model.
|
|
Initialize ( ) : Task | ||
InitializeModelInternal ( string modelProperty, object model ) : void |
Initializes a model by subscribing to all events.
|
|
InitializePropertiesWithAttributes ( ) : void |
Initializes the properties with attributes.
|
|
InitializeThrottling ( ) : void | ||
InitializeViewModel ( ) : Task | ||
InitializeViewModelMetaData ( |
Initializes the view model meta data.
|
|
OnChildViewModelClosed ( object sender, |
Called when the child view model is closed.
|
|
OnChildViewModelPropertyChanged ( object sender, |
Called when a property has changed on the child view model.
|
|
OnClosed ( bool result ) : void | ||
OnClosing ( ) : void | ||
OnModelErrorInfoUpdated ( object sender, |
Called when the ModelErrorInfo.Updated event occurs.
|
|
OnModelPropertyChangedInternal ( object sender, |
Handles the PropertyChanged event of a Model.
|
|
OnThrottlingTimerTick ( ) : void |
Called when the throttling timer ticks.
|
|
PrepareForTombstoneStateInternal ( object>.IDictionary |
Prepares the state for tombstoning. This method is implemented so the PhoneApplicationPage can call this method. |
|
RecoverFromTombstoneStateInternal ( object>.IDictionary |
Recovers the state from tombstoning. This method is implemented so the PhoneApplicationPage can call this method. |
|
Save ( ) : Task |
||
SaveAndCloseViewModel ( ) : Task |
||
SaveViewModel ( ) : Task |
||
SerializeForTombstoning ( ) : byte[] |
Serializes the data in the view model for tombstoning.
|
|
UninitializeModelInternal ( string modelProperty, object model, ModelCleanUpMode modelCleanUpMode ) : void |
Uninitializes a model by unsubscribing from all events.
|
|
UninitializeThrottling ( ) : void | ||
ValidateViewModelToModelMappings ( ) : void |
Validates the view model to model mappings.
|
|
ViewModelBase ( ) : System |
Initializes static members of the ViewModelBase class.
|
public CloseViewModelAsync ( bool result ) : Task | ||
result | bool | The result to pass to the view. This will, for example, be used as |
return | Task |
protected GetChildViewModels ( ) : IEnumerable |
||
return | IEnumerable |
protected InitializeModel ( string modelProperty, object model ) : void | ||
modelProperty | string | The name of the model property. |
model | object | The model. |
return | void |
protected InitializeViewModelAttributes ( ) : void | ||
return | void |
protected IsModelRegistered ( string name ) : bool | ||
name | string | The name of the registered model. |
return | bool |
protected OnClosedAsync ( bool result ) : Task | ||
result | bool | The result to pass to the view. This will, for example, be used as |
return | Task |
protected OnModelPropertyChanged ( object sender, |
||
sender | object | The sender. |
e | The |
|
return | void |
protected OnPropertyChanged ( AdvancedPropertyChangedEventArgs e ) : void | ||
e | AdvancedPropertyChangedEventArgs | The |
return | void |
protected OnValidated ( IValidationContext validationContext ) : void | ||
validationContext | IValidationContext | The validation context. |
return | void |
protected OnValidating ( IValidationContext validationContext ) : void | ||
validationContext | IValidationContext | The validation context. |
return | void |
protected OnValidatingBusinessRules ( IValidationContext validationContext ) : void | ||
validationContext | IValidationContext | The validation context. |
return | void |
protected OnValidatingFields ( IValidationContext validationContext ) : void | ||
validationContext | IValidationContext | The validation context. |
return | void |
protected OnViewModelCommandExecuted ( IViewModel viewModel, ICatelCommand command, object commandParameter ) : void | ||
viewModel | IViewModel | The view model. |
command | ICatelCommand | The command that has been executed. |
commandParameter | object | The command parameter used during the execution. |
return | void |
protected OnViewModelEvent ( IViewModel viewModel, ViewModelEvent viewModelEvent, |
||
viewModel | IViewModel | The view model. |
viewModelEvent | ViewModelEvent | The view model event. |
e | The |
|
return | void |
protected OnViewModelPropertyChanged ( IViewModel viewModel, string propertyName ) : void | ||
viewModel | IViewModel | The view model. |
propertyName | string | Name of the property. |
return | void |
protected PrepareForTombstoneState ( object>.IDictionary |
||
state | object>.IDictionary | The target state which can be used to store values. |
return | void |
protected RaisePropertyChanged ( object sender, AdvancedPropertyChangedEventArgs e ) : void | ||
sender | object | The sender. |
e | AdvancedPropertyChangedEventArgs | The |
return | void |
protected RecoverFromTombstoneState ( object>.IDictionary |
||
state | object>.IDictionary | The source state to recover values from. |
return | void |
protected RegisterViewModelServices ( IServiceLocator serviceLocator ) : void | ||
serviceLocator | IServiceLocator | The service locator. |
return | void |
protected ResetModel ( string modelProperty, ModelCleanUpMode modelCleanUpMode ) : void | ||
modelProperty | string | The model property. |
modelCleanUpMode | ModelCleanUpMode | The model clean up mode. |
return | void |
protected UninitializeModel ( string modelProperty, object model, ModelCleanUpMode modelCleanUpMode ) : void | ||
modelProperty | string | The name of the model property. |
model | object | The model. |
modelCleanUpMode | ModelCleanUpMode | The model clean up mode. |
return | void |
protected UpdateExplicitViewModelToModelMappings ( ) : void | ||
return | void |
public ValidateViewModel ( bool force = false, bool notifyChangedPropertiesOnly = true ) : bool | ||
force | bool | If set to |
notifyChangedPropertiesOnly | bool | if set to |
return | bool |
protected ViewModelBase ( IServiceLocator serviceLocator, bool supportIEditableObject = true, bool ignoreMultipleModelsWarning = false, bool skipViewModelAttributesInitialization = false ) : System | ||
serviceLocator | IServiceLocator | The service locator to inject. If |
supportIEditableObject | bool | if set to |
ignoreMultipleModelsWarning | bool | if set to |
skipViewModelAttributesInitialization | bool | if set to |
return | System |
protected ViewModelBase ( bool supportIEditableObject, bool ignoreMultipleModelsWarning = false, bool skipViewModelAttributesInitialization = false ) : System | ||
supportIEditableObject | bool | if set to |
ignoreMultipleModelsWarning | bool | if set to |
skipViewModelAttributesInitialization | bool |
/// if set to |
return | System |