예제 #1
0
 public static void UpdateAll(object model, DependencyObject view)
 {
     foreach (var member in FacadeType.Create(view.GetType(), model.GetType()).Members)
     {
         member.UpdateFrom(model, view);
     }
 }
예제 #2
0
        public static void Update(object model, DependencyObject view, DependencyPropertyChangedEventArgs change)
        {
            FacadeMapping member;

            if (FacadeType.Create(view.GetType(), model.GetType()).ByViewProperty.TryGetValue(change.Property, out member))
            {
                member.Update(model, change.NewValue);
            }
        }