コード例 #1
0
ファイル: Objects.cs プロジェクト: panta82/delta_draw
        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();
        }
コード例 #2
0
ファイル: Manipulation.cs プロジェクト: panta82/delta_draw
 public DDNodeObjectTC(DDNodeObject target)
     : base(target)
 {
 }