Beispiel #1
0
 protected override void OnVisualParentChanged(DependencyObject oldParent)
 {
     base.OnVisualParentChanged(oldParent);
     Trace.WriteLine(string.Format("Parent changed: Old: {0}, New: {1}", oldParent, Parent));
     nearestParent = WalkVisualTree() as UIElement;
     root          = this.FindVisualParent <NodePanel>();
     Trace.WriteLine(string.Format("Found nearest Parent: {0}", nearestParent));
 }
Beispiel #2
0
 protected override void OnVisualParentChanged(DependencyObject oldParent)
 {
     base.OnVisualParentChanged(oldParent);
     if (null != Node) Node.LayoutUpdated -= NodeOnLayoutUpdated;
     Node = this.FindVisualParent<Node>();
     rootPanel = this.FindVisualParent<NodePanel>();
     if (null == rootPanel) return;
     if (null == Node) return;
     addConnectorCallback = x => rootPanel.AddConnector(x);
     Node.LayoutUpdated += NodeOnLayoutUpdated;
     SetGlobalPosition();
 }
Beispiel #3
0
 protected override void OnVisualParentChanged(DependencyObject oldParent)
 {
     base.OnVisualParentChanged(oldParent);
     if (null != Node)
     {
         Node.LayoutUpdated -= NodeOnLayoutUpdated;
     }
     Node      = this.FindVisualParent <Node>();
     rootPanel = this.FindVisualParent <NodePanel>();
     if (null == rootPanel)
     {
         return;
     }
     if (null == Node)
     {
         return;
     }
     addConnectorCallback = x => rootPanel.AddConnector(x);
     Node.LayoutUpdated  += NodeOnLayoutUpdated;
     SetGlobalPosition();
 }
Beispiel #4
0
 protected override void OnVisualParentChanged(DependencyObject oldParent)
 {
     base.OnVisualParentChanged(oldParent);
     root = this.FindVisualParent <NodePanel>();
 }
Beispiel #5
0
 protected override void OnVisualParentChanged(DependencyObject oldParent)
 {
     base.OnVisualParentChanged(oldParent);
     Trace.WriteLine(string.Format("Parent changed: Old: {0}, New: {1}", oldParent, Parent));
     nearestParent = WalkVisualTree() as UIElement;
     root = this.FindVisualParent<NodePanel>();
     Trace.WriteLine(string.Format("Found nearest Parent: {0}", nearestParent));
 }
Beispiel #6
0
 protected override void OnVisualParentChanged(DependencyObject oldParent)
 {
     base.OnVisualParentChanged(oldParent);
     root = this.FindVisualParent<NodePanel>();
 }