Beispiel #1
0
 static void OnDocumentOwnerChanged(DependencyObject d, IDocumentOwner newValue)
 {
     ViewModelInitializer.SetViewModelDocumentOwner(d, newValue);
     ParameterAndParentViewModelSyncBehavior.AttachTo(d);
 }
Beispiel #2
0
 void OnAssociatedObjectDataContextChanged(object sender, DependencyPropertyChangedEventArgs e)
 {
     ViewModelInitializer.SetViewModelParameter(AssociatedObject, GetParameter(AssociatedObject));
     ViewModelInitializer.SetViewModelParentViewModel(AssociatedObject, GetParentViewModel(AssociatedObject));
     ViewModelInitializer.SetViewModelDocumentOwner(AssociatedObject, GetDocumentOwner(AssociatedObject));
 }