Exemple #1
0
 public InProcDesignerView(HostedAppModel appModel)
 {
     _appModel = appModel;
     InitializeComponent();
     DataContext = _appModel;
     _appModel.PropertyChanged += ModelPropertyChanged;
     WindowHostControl.Child    = _host = new WindowHost(true);
     HandleVisibility();
     HandleWindow();
 }
Exemple #2
0
 private void OnDataContextChanged(object sender, DependencyPropertyChangedEventArgs e)
 {
     if (_appModel != null)
     {
         _appModel.PropertyChanged -= ModelPropertyChanged;
     }
     _appModel = DataContext as HostedAppModel;
     if (_appModel != null)
     {
         _appModel.PropertyChanged += ModelPropertyChanged;
     }
 }