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)

public:
DrawingContext^ RenderOpen()

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
Available since 3.0
Return to top
Show: