Windows Dev Center

Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

DrawingContext.Close Method

Closes the DrawingContext and flushes the content. Afterward, the DrawingContext cannot be modified.

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

public abstract void Close()

ExceptionCondition
ObjectDisposedException

This object has already been closed or disposed.

A DrawingContext must be closed before its content can be rendered, but after it has been closed, it cannot be modified. This call does not require all Push calls to have been Popped.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft