private static void PointsPropertyChangedCallback(DependencyObject sender, DependencyPropertyChangedEventArgs args) { DDNodeObject realSender = sender as DDNodeObject; if (realSender == null) { return; } // Setup callbacks for adding and removing nodes. // FreezableCollection could have done this automatically, but then we wouldn't have had // advanced features of INotifyCollectionChanged (eg. lists of affected nodes). if (args.OldValue != null) { ((DDNodeCollection)args.OldValue).CollectionChanged -= realSender.Nodes_CollectionChanged; } if (args.NewValue != null) { ((DDNodeCollection)args.NewValue).CollectionChanged += realSender.Nodes_CollectionChanged; } realSender.SetupGeometry(); }
public DDNodeObjectTC(DDNodeObject target) : base(target) { }