public void InsertTreeControl(UserControl control) { VisualNavigatorNode newNode; if (!dict.ContainsKey(control)) { newNode = new VisualNavigatorNode() { Control = control }; dict[control] = newNode; } else { newNode = dict[control]; } // низ текущего прикрепляем у низу нового newNode.Link(LinkDirection.ldBottom, this.FocusedNode.GetLinkedNode(LinkDirection.ldBottom)); OnPropertyChanged("TopDirectionModelName"); // верх нового прикрепляем к низу текущего LinkControl(LinkDirection.ldBottom, control); OnPropertyChanged("BottomDirectionModelName"); // левая сторона нового = левой стороне текущего newNode.Link(LinkDirection.ldLeft, this.FocusedNode.GetLinkedNode(LinkDirection.ldLeft)); OnPropertyChanged("LeftDirectionModelName"); // правая сторона нового = правой стороне текущего newNode.Link(LinkDirection.ldRight, this.FocusedNode.GetLinkedNode(LinkDirection.ldRight)); OnPropertyChanged("RightDirectionModelName"); }
private void AddLinkedControl(UserControl control) { dict[control] = new VisualNavigatorNode() { Control = control }; }
public void Link(LinkDirection direction, VisualNavigatorNode node) { arr[(int)direction] = node; // link back if (node != null) { var invertDirection = LinkDirectionHelper.Invert(direction); var invertDirectionNode = node.GetLinkedNode(invertDirection); if (invertDirectionNode != this) node.Link(invertDirection, this); } }
public void Link(LinkDirection direction, VisualNavigatorNode node) { arr[(int)direction] = node; // link back if (node != null) { var invertDirection = LinkDirectionHelper.Invert(direction); var invertDirectionNode = node.GetLinkedNode(invertDirection); if (invertDirectionNode != this) { node.Link(invertDirection, this); } } }
public void InsertTreeControl(UserControl control) { VisualNavigatorNode newNode; if (!dict.ContainsKey(control)) { newNode = new VisualNavigatorNode() { Control = control }; dict[control] = newNode; } else newNode = dict[control]; // низ текущего прикрепляем у низу нового newNode.Link(LinkDirection.ldBottom, this.FocusedNode.GetLinkedNode(LinkDirection.ldBottom)); OnPropertyChanged("TopDirectionModelName"); // верх нового прикрепляем к низу текущего LinkControl(LinkDirection.ldBottom, control); OnPropertyChanged("BottomDirectionModelName"); // левая сторона нового = левой стороне текущего newNode.Link(LinkDirection.ldLeft, this.FocusedNode.GetLinkedNode(LinkDirection.ldLeft)); OnPropertyChanged("LeftDirectionModelName"); // правая сторона нового = правой стороне текущего newNode.Link(LinkDirection.ldRight, this.FocusedNode.GetLinkedNode(LinkDirection.ldRight)); OnPropertyChanged("RightDirectionModelName"); }