public ArrowCanvas(ReferenceCanvas reference)
        {
            Reference = reference;

            _BindingCreator.FillBrush = Brushes.Black;

            _PathBinding = _BindingCreator.Create(GeometryCreator.Create(Reference));
        }
        public PathBinding SetSolid(PathBinding path)
        {
            path.Stroke = StrokeBrush;

            path.Fill = FillBrush;

            path.Thickness = Thickness;

            path.StrokeDashCap = PenLineCap.Flat;

            path.StrokeDashArray = null;

            return(path);
        }
        public PathBinding SetDashes(PathBinding path)
        {
            path.Stroke = StrokeBrush;

            path.Fill = FillBrush;

            path.Thickness = Thickness;

            path.StrokeDashCap = PenLineCap.Round;

            path.StrokeDashArray = StrokeDashArray;

            return(path);
        }
Example #4
0
        public void Update()
        {
            if (View.type == ReferencesType.Dependency || View.type == ReferencesType.Realization)
            {
                _BindingCreator.Type = PathType.Dashed;
            }
            else
            {
                _BindingCreator.Type = PathType.Solid;
            }

            _PathBinding = _BindingCreator.Create(GeometryCreator.Create(this));

            Arrow.Update();
        }
Example #5
0
        public ReferenceCanvas(SubjectReferenceView view, SubjectCanvas subject, SubjectCanvas target)
        {
            View = view;

            Subject = subject;

            Target = target;

            if (View.type == ReferencesType.Dependency || View.type == ReferencesType.Realization)
            {
                _BindingCreator.Type = PathType.Dashed;
            }

            _PathBinding = _BindingCreator.Create(GeometryCreator.Create(this));

            Arrow = new ArrowCanvas(this);
        }
        //= new DoubleCollection(new double[] { 20, 10 });

        public PathBinding Create(PathGeometry geometry)
        {
            var path = new PathBinding();

            switch (Type)
            {
            case PathType.Solid:
                path = SetSolid(path);
                break;

            case PathType.Dashed:
                path = SetDashes(path);
                break;
            }

            path.Data = geometry;

            return(path);
        }
 public void Update()
 {
     _PathBinding = _BindingCreator.Create(GeometryCreator.Create(Reference));
 }