#235 – Types of Visual Content that You Can Create Using a DrawingContext

You can render content in a DrawingVisual object by calling its RenderOpen method, which returns a DrawingContext, and then drawing objects by invoking methods on the DrawingContext.

Here are the main DrawingContext methods that you can use to create content in the DrawingVisual:

  • DrawEllipse - Draw an ellipse, specifying the center and radius
  • DrawGeometry - Draw an arbitrary geometry, passing in an instance of Geometry
  • DrawGlyphRun - Render text, passing in an instance of GlyphRun
  • DrawImage - Render an image
  • DrawLine - Draw a line, specifying the endpoints
  • DrawRectangle - Draw a rectangle, specifying the corners
  • DrawRoundedRectangle - Draw a rectangle with rounded corners
  • DrawText - Render text, passing in an instance of FormattedText
  • DrawVideo - Render a video, specifying the media source and corner points of rectangle in which to play the video

 

About these ads

About Sean
Software developer in the Twin Cities area, passionate about .NET technologies. Equally passionate about my own personal projects related to family history and preservation of family stories and photos.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 381 other followers

%d bloggers like this: