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