SilverlightMappingToolBasic.UI.SuperGraph.View.NodeControlSupportClasses.NodeControl.LinkFromNode C# (CSharp) Method

LinkFromNode() public method

public LinkFromNode ( NodeControl node ) : void
node NodeControl
return void
        public void LinkFromNode(NodeControl node)
        {
            AddChild(node);
            node.AddParent(this);
        }

Usage Example

Esempio n. 1
0
        private ArrowControlFactorySet CreateSet(ViewModel.Relationship viewModelRelationship, NodeControl fromControl, NodeControl toControl)
        {
            ArrowController arrowController = new ArrowController(viewModelRelationship, fromControl, toControl);
            
            arrowController.ViewModel.Id = viewModelRelationship.Id;
            if (toControl != null)
            {
                toControl.LinkFromNode(fromControl);
            }
            ArrowControl arrowControl = new ArrowControl(fromControl, toControl);
            Canvas.SetZIndex(arrowControl, 40);
            arrowControl.DataContext = arrowController.ViewModel;
            if (toControl != null && toControl.ViewModelNode.State == CollapseState.None)
            {
                toControl.ViewModelNode.State = CollapseState.Expanded;
            }
            ArrowControlFactorySet set = new ArrowControlFactorySet();
            set.Relationship = viewModelRelationship;
            set.Control = arrowControl;
            set.Controller = arrowController;

            return set;
        }