Exemplo n.º 1
0
 public virtual void InitializePropertyPage(PropertyPageViewModel viewModel)
 {
     _ignoreEvents              = true;
     IsDirty                    = false;
     ViewModel                  = viewModel;
     ViewModel.PropertyChanged += ViewModel_PropertyChanged;
     ViewModel.ParentControl    = this;
     _ignoreEvents              = false;
 }
Exemplo n.º 2
0
        protected async override Task OnSetObjectsAsync(bool isClosing)
        {
            if (isClosing)
            {
                control.DetachViewModel();
                return;
            }
            else
            {
                //viewModel can be non-null when the configuration is chaged.
                if (control == null)
                {
                    control = CreatePropertyPageControl();
                }
            }

            viewModel = CreatePropertyPageViewModel();
            viewModel.UnconfiguredProject = UnconfiguredProject;
            await viewModel.InitializeAsync().ConfigureAwait(false);

            control.InitializePropertyPage(viewModel);
        }