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