title: Graphics does not draw GraphicsPath with Line
body: <p>I have a Windows Forms app where I add different figures(rectangles, circles, etc.) to the main form. The figure is a UserControl and it's shape I define with GraphicsPath.
  Method for adding new figure:</p>
  
  <pre><code> void AddElement(ShapeType shape, string guid)
      {
          Shape newShape = new Shape();
          newShape.Name = guid;
          newShape.Size = new Size(100, 100);           
          newShape.Type = shape;
          newShape.Location = new Point(100, 100);
  
          newShape.MouseDown += new MouseEventHandler(Shape_MouseDown);
          newShape.MouseMove += new MouseEventHandler(Shape_MouseMove);
          newShape.MouseUp += new MouseEventHandler(Shape_MouseUp);
          newShape.BackColor = this.BackColor;
  
          this.Controls.Add(newShape);
      }
  </code></pre>
  
  <p>In Shape (Figure) class:</p>
  
  <pre><code> private ShapeType shape;
   private GraphicsPath path = null;
   public ShapeType Type
      {
          get { return shape; }
          set
          {
              shape = value;
              DrawElement();
          }
      } 
  
   private void DrawElement()
       {
          path = new GraphicsPath();
          switch (shape)
          {
              case ShapeType.Rectangle:
                  path.AddRectangle(this.ClientRectangle);
                  break;
  
              case ShapeType.Circle:
                  path.AddEllipse(this.ClientRectangle);
                  break;
  
              case ShapeType.Line:
                  path.AddLine(10,10,20,20);                   
                  break;
          }
          this.Region = new Region(path);
      }
  
  protected override void OnPaint(System.Windows.Forms.PaintEventArgs e)
      {
          if (path != null)
          {              
              e.Graphics.DrawPath(new Pen(Color.Black, 4), path);
          }
      }
  </code></pre>
  
  <p>When resizing the figure, I redraw It:</p>
  
  <pre><code> protected override void OnResize(System.EventArgs e)
      {
          DrawElement();
          this.Invalidate();
      }
  </code></pre>
  
  <p>Everything works fine when I add shapes like rectangle and circle. But when I choose Line, nothing appears on my form. The breakpoint shows that the programs steps in all the methods and <code>this.Controls.Add(newShape);</code> as well. </p>
  
  <p>I do not understand why this is not working.
  I'd appreciate any advice.</p>