Ejemplo n.º 1
0
 public static void NotifyOnChange <T>(this INotifyStateChange self, string dependentProperty,
                                       params string[] dependsOn)
 {
     foreach (var dependsOnPropName in dependsOn)
     {
         self.HookToPropertyChangedEvent <T>(dependsOnPropName, c => self.RaisePropertyChanged(dependentProperty));
     }
 }
Ejemplo n.º 2
0
        private static void StateChanged(INotifyStateChange self, string name, object value)
        {
            self.RaisePropertyChanged(name);
            var tracking = (self as IChangeTracking);

            if (tracking != null)
            {
                tracking.TrackChanges(name, value);
            }
        }