Example #1
0
        public override void UpdateGeometry()
        {
            var myGeometry = Geometry as GeometryGroup;

            myGeometry.Children.Clear();

            Point[] pathPoints = new []
            {
                new Point(0, 0),
                new Point(Bounds.Width, 0),
                new Point(Bounds.Width, Bounds.Height),
                new Point(0, Bounds.Height),
                new Point(Bounds.Height / 2, Bounds.Height / 2)
            };
            var pf = ConnectorUtilities.GetPathFigureFromPoints(pathPoints);

            pf.IsClosed = true; pf.IsFilled = true;

            myGeometry.Children.Add(new PathGeometry(new[] { pf }));

            myGeometry.Transform = Rotation;
        }