Ejemplo n.º 1
0
        //--------------------------------------------------------------------------
        public Connection()
        {
            DataContextChanged += (e, args) =>
            {
                GraphNodeDataLink.Connection = this;
                GraphNodeDataLink.RaisePropertyChangedEvent("Connection");
                RaisePropertyChangedEvent("GraphNodeDataLink");
            };

            this.LayoutUpdated += (e, args) =>
            {
                UpdatePosition();
            };
        }
Ejemplo n.º 2
0
        //--------------------------------------------------------------------------
        public LinkControlPoint(GraphNodeDataLink parent, GraphReferenceControlPoint controlPoint)
        {
            DataContext = this;

            LinkParent        = parent;
            this.controlPoint = controlPoint;

            controlPoint.PropertyChanged += (e, args) =>
            {
                if (args.PropertyName == "Position")
                {
                    RaisePropertyChangedEvent("Position");

                    RaisePropertyChangedEvent("CanvasX");
                    RaisePropertyChangedEvent("CanvasY");

                    LinkParent.RaisePropertyChangedEvent("Link");
                }
                else if (args.PropertyName == "Flip")
                {
                    LinkParent.RaisePropertyChangedEvent("Link");
                }
            };
        }