C# Class Catel.Examples.WPF.PersonApplication.ViewModels.PersonViewModel

Person view model.
Inheritance: MVVM.ViewModelBase
Show file Open project: Catel/Catel.Examples Class Usage Examples

Public Properties

Property Type Description
CustomErrorProperty PropertyData
GenderProperty PropertyData
LastNameProperty PropertyData
PersonProperty PropertyData

Private Properties

Property Type Description
OnGenerateDataCanExecute bool
OnGenerateDataExecute void
OnToggleCustomErrorExecute void

Public Methods

Method Description
PersonViewModel ( Person person ) : System.Collections.Generic

Initializes a new instance of the PersonViewModel class.

Protected Methods

Method Description
ValidateFields ( List validationResults ) : void

Validates the field values of this object. Override this method to enable validation of field values.

Private Methods

Method Description
OnGenerateDataCanExecute ( object parameter ) : bool

Method to check whether the GenerateData command can be executed.

OnGenerateDataExecute ( object parameter ) : void

Method to invoke when the GenerateData command is executed.

OnToggleCustomErrorExecute ( object parameter ) : void

Method to invoke when the ToggleCustomError command is executed.

Method Details

PersonViewModel() public method

Initializes a new instance of the PersonViewModel class.
public PersonViewModel ( Person person ) : System.Collections.Generic
person Person The person.
return System.Collections.Generic

ValidateFields() protected method

Validates the field values of this object. Override this method to enable validation of field values.
protected ValidateFields ( List validationResults ) : void
validationResults List The validation results, add additional results to this list.
return void

Property Details

CustomErrorProperty public static property

Register the CustomError property so it is known in the class.
public static PropertyData CustomErrorProperty
return PropertyData

GenderProperty public static property

Register the Gender property so it is known in the class.
public static PropertyData GenderProperty
return PropertyData

LastNameProperty public static property

Register the LastName property so it is known in the class.
public static PropertyData LastNameProperty
return PropertyData

PersonProperty public static property

Register the Person property so it is known in the class.
public static PropertyData PersonProperty
return PropertyData