DrawingVisual.RenderOpen Method

Opens the DrawingVisual object for rendering. The returned DrawingContext value can be used to render into the DrawingVisual.

Namespace:  System.Windows.Media
Assembly:  PresentationCore (in PresentationCore.dll)

member RenderOpen : unit -> DrawingContext 

Return Value

Type: System.Windows.Media.DrawingContext
A value of type DrawingContext.

When you call the Close method of the DrawingContext, the current drawing content replaces any previous drawing content defined for the DrawingVisual. This means that there is no way to append new drawing content to existing drawing content.

In the following example, a DrawingVisual object is created, and its DrawingContext returned.

No code example is currently available or this language may not be supported.

The order in which you draw into the drawing context is important—each succeeding drawing is drawn on top of the others. In the following example, the rectangle is drawn first, then the text.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2015 Microsoft