投稿者 kojiro  (社会人) 投稿日時 2024/3/6 09:29:57
いつもお世話になっております。
c#の初級講座で、
 
namespace DrawPenLesson
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void pictureBox1_Paint(object sender, PaintEventArgs e)
        {
            Draw(e.Graphics);
        }
        private void Draw(Graphics g)
        {
            g.Clear(Color.Black);
            Point[] points1 = new Point[4];
            points1[0] = new Point(0, 0);
            points1[1] = new Point(150, 60);
            points1[2] = new Point(80, 200);
            points1[3] = new Point(500, 150);

            //Pen boldPen = new Pen(Color.HotPink, 5);
            Pen pen1 = new Pen(Color.Red, 5);


            //Point p1 = new Point(20, 20);
            //Point p2 = new Point(500, 200);
            //g.DrawLine(boldPen, p1, p2);
            g.DrawLines(pen1, points1);

            Point[] points2 = new Point[6];
            points2[0] = new Point(300, 50);
            points2[1] = new Point(600, 500);
            points2[2] = new Point(50, 450);
            points2[3] = new Point(400, 110);
            points2[4] = new Point(500, 560);
            points2[5] = new Point(130, 40);

            Pen pen2 = new Pen(Color.BlueViolet, 8);
            g.DrawLines(pen2, points2);

            //Point p3 = new Point(100, 400);
            //g.DrawLine(boldPen, p2, p3);
        }
    }
}
 


が、ありますが、xamarinでは、どんなコントロールを使って、作るのでしょうか?