public virtual void InitializePropertyPage(PropertyPageViewModel viewModel) { _ignoreEvents = true; IsDirty = false; ViewModel = viewModel; ViewModel.PropertyChanged += ViewModel_PropertyChanged; ViewModel.ParentControl = this; _ignoreEvents = false; }
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); }