Draws formatted text at the specified location.
Assembly: PresentationCore (in PresentationCore.dll)
The following example shows how to draw text to a DrawingVisual using a DrawingContext object. A drawing context is returned by calling the RenderOpen method of a DrawingVisual object. You can draw graphics and text into a drawing context.
To draw text into the drawing context, use the method of a DrawingContext object. When you are finished drawing content into the drawing context, call the Close method to close the drawing context and persist the content.
For the complete code sample from which the preceding code example was extracted, see Hit Test Using DrawingVisuals Sample.