Esempio n. 1
0
        public override void Draw(CGRect rect)
        {
            var path = new UIBezierPath();

            path.LineWidth    = LineWidth;
            path.LineCapStyle = CGLineCap.Round;


            var iconFrame = new CGRect(
                x: (rect.Width - IconSize) / 2.0,
                y: (rect.Height - IconSize) / 2.0,
                width: IconSize,
                height: IconSize
                );

            path.MoveTo(iconFrame.Location);
            path.AddLineTo(new CGPoint(iconFrame.GetMaxX(), iconFrame.GetMaxY()));
            path.MoveTo(new CGPoint(iconFrame.GetMaxX(), iconFrame.GetMinY()));
            path.AddLineTo(new CGPoint(iconFrame.GetMinX(), iconFrame.GetMaxY()));

            LineColor.SetStroke();
            path.Stroke();
        }