Beispiel #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="TestViewModel"/> class.
        /// </summary>
        /// <param name="serviceLocator">The service locator.</param>
        /// <param name="person">The person.</param>
        /// <param name="specialValidationModel">The special validation model.</param>
        /// <param name="validateModelsOnInitialization">if set to <c>true</c>, the view model will validate on initialization.</param>
        private TestViewModel(IServiceLocator serviceLocator, IPerson person, SpecialValidationModel specialValidationModel,
                              bool validateModelsOnInitialization = true)
            : base(serviceLocator)
        {
            ValidateModelsOnInitialization = validateModelsOnInitialization;

            Person = person;
            SpecialValidationModel = specialValidationModel;

            GenerateData = new Command <object, object>(OnGenerateDataExecute, OnGenerateDataCanExecute);
            GenerateData.AutomaticallyDispatchEvents = false;

            DeferValidationUntilFirstSaveCall = false;
        }
Beispiel #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TestViewModel"/> class.
 /// </summary>
 /// <param name="specialValidationModel">The special validation model.</param>
 public TestViewModel(SpecialValidationModel specialValidationModel)
     : this(null, null, specialValidationModel)
 {
 }