Exemplo n.º 1
0
        /// <summary>
        /// Common Initialization
        /// </summary>
        private void internalInitialization()
        {
            // Wires ViewModel Property Changes Event Upstream
            this.ViewModel.PropertyChanged += (object sender, PropertyChangedEventArgs e) => {
                if (this.PropertyChanged != null)
                {
                    this.PropertyChanged(sender, e);
                }
            };

            // Set default Snapshots Provider
            if (this._snapshotProvider == null)
            {
                this._snapshotProvider = new SnapshotProvider.DefaultSnapshotProvider <TFormViewModel>();
            }
        }
Exemplo n.º 2
0
        public FormViewBase(IFormViewModelSnapshotProvider <TFormViewModel> snapshotProvider)
        {
            this.ViewModel = new TFormViewModel();

            if (this.IsDesignMode)
            {
                this.InitializeOnDesignMode();
            }
            else
            {
                this.Initialize();
            }

            this._snapshotProvider = snapshotProvider;

            this.internalInitialization();
        }