Пример #1
0
 static void OnParameterChanged(DependencyObject d, object newValue)
 {
     if (NotSetParameter == newValue)
     {
         return;
     }
     ViewModelInitializer.SetViewModelParameter(d, newValue);
     ParameterAndParentViewModelSyncBehavior.AttachTo(d);
 }
Пример #2
0
 void OnAssociatedObjectDataContextChanged(object sender, DependencyPropertyChangedEventArgs e)
 {
     ViewModelInitializer.SetViewModelParameter(AssociatedObject, GetParameter(AssociatedObject));
     ViewModelInitializer.SetViewModelParentViewModel(AssociatedObject, GetParentViewModel(AssociatedObject));
     ViewModelInitializer.SetViewModelDocumentOwner(AssociatedObject, GetDocumentOwner(AssociatedObject));
 }