<PackageReference Include="System.Drawing.Common" Version="9.0.0-preview.2.24128.3" />

BufferedGraphicsContext

public sealed class BufferedGraphicsContext : IDisposable
Provides methods for creating graphics buffers that can be used for double buffering.
public Size MaximumBuffer { get; set; }

Gets or sets the maximum size of the buffer to use.

Initializes a new instance of the BufferedGraphicsContext class.

public BufferedGraphics Allocate(Graphics targetGraphics, Rectangle targetRectangle)

Creates a graphics buffer of the specified size using the pixel format of the specified Graphics.

public BufferedGraphics Allocate(IntPtr targetDC, Rectangle targetRectangle)

Creates a graphics buffer of the specified size using the pixel format of the specified Graphics.

public void Dispose()

Releases all resources used by the BufferedGraphicsContext.

public void Invalidate()

Disposes of the current graphics buffer, if a buffer has been allocated and has not yet been disposed.