title: draw simply a rectangle on canvas
body: <p>I am newbie of C# and WPF.</p>
  
  <p>I want to <strong>draw simply a rectangle on canvas</strong>.</p>
  
  <p>but I could not find the variable which decide <strong>origin point of rectangle</strong>.</p>
  
  <pre><code>    void DrawRect(int x, int y) 
      {
          Rectangle rec = new Rectangle
          {
              Fill = new SolidColorBrush(Colors.Red),
              Width = width,
              Height = y
              ...???
          };
          mainWindow.canvas.Children.Add(rec);
      }
  </code></pre>
  
  <p>Thank you for your help.</p>