public static void UpdateAll(object model, DependencyObject view) { foreach (var member in FacadeType.Create(view.GetType(), model.GetType()).Members) { member.UpdateFrom(model, view); } }
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); } }