title: Draw text on a shape in a wpf
body: <p>Some of you maybe find this question dull but I am still not deeply accustomed to wpf drawing. I want to add formatted text on a Rectangle which moves around on a canvas and I have got a hint to override the UIElement.OnRender method. However I do not know if I should override the canvas class or the Shape class. In any correct case, to what refers the drawingContext parameter of the method as described in the example: <a href="http://msdn.microsoft.com/en-us/library/bb613560.aspx#FormattedText_Object" rel="nofollow">http://msdn.microsoft.com/en-us/library/bb613560.aspx#FormattedText_Object</a> ? </p>
  
  <p>Is the text ultimately assigned to the shape or is it a visual temporary effect that cannot move along with the shape on the canvas? </p>
  
  <p>Is there any further effective means of drawing text on a shape?</p>