Check out example codes for "c# graphics draw filled rectangle". It will help you in understanding the concepts better.

Code Example 1

private void FillRectangleRectangle(PaintEventArgs e)

    // Create solid brush.
    SolidBrush blueBrush = new SolidBrush(Color.Blue);

    // Create rectangle.
    Rectangle rect = new Rectangle(0, 0, 200, 200);

    // Fill rectangle to screen.
    e.Graphics.FillRectangle(blueBrush, rect);

Learn ReactJs, React Native from