WriteableBitmap.BackBuffer Property


Gets a pointer to the back buffer.

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

public IntPtr BackBuffer {
	private set;

Property Value

Type: System.IntPtr

An IntPtr that points to the base address of the back buffer.

The back buffer contains the bitmap contents in the pixel format requested by the user.

Update the back buffer only between calls to the Lock and Unlock methods. If you do not follow the Lock/Unlock workflow described in the WriteableBitmap class remarks, undefined behaviors, such as tearing, can occur.

The address of the back buffer does not change.

You can pass the BackBuffer pointer to external components and other threads for processing, but if you do, you must provide you own thread coordination. In particular, you must ensure that the UI thread specifies changed areas by calling the AddDirtyRect method, and that the UI thread unlocks the buffer by calling the Unlock method.

.NET Framework
Available since 3.0
Return to top