title: Drawing text centered within a rectangle
body: <p>I have code, similar to the following:</p>
  
  <pre><code>string myText = "This is a test";
  Font myFont = new Font("Arial", 10);
  Rectangle rect = new Rectangle(10,10,100,100);
  Graphics g = e.Graphics;
  g.DrawString(myText, myFont, rect.X, rect.Y);
  </code></pre>
  
  <p>Although this works, what I would like to do is have the text vertically and horizontally centered within the dimensions of the rectangle. In addition, if its possible, I'd like to wrap the text if its too big to fit on one line. How do I do this in C#/GDI+?</p>