BufferedGraphicsContext::MaximumBuffer Property
.NET Framework (current version)
Gets or sets the maximum size of the buffer to use.
Assembly: System.Drawing (in System.Drawing.dll)
| Exception | Condition |
|---|---|
| ArgumentException | The height or width of the size is less than or equal to zero. |
This property allows you to get or set the maximum dimensions for a buffer that should be retained in memory. You can allocate a buffer of any size, however any buffer with dimensions greater than the MaximumBuffer size will be used temporarily and then discarded when the BufferedGraphics object is released.
The following example demonstrates setting the maximum size for the buffer for a BufferedGraphicsContext. This code is part of a larger example provided for the BufferedGraphics class.
// Sets the maximum size for the graphics buffer // of the buffered graphics context. Any allocation // requests for a buffer larger than this will create // a temporary buffered graphics context to host // the graphics buffer. appDomainBufferedGraphicsContext->MaximumBuffer = System::Drawing::Size( 400, 400 );
UIPermission
for allowing user access to all windows. Related enumeration: AllWindows
.NET Framework
Available since 2.0
Available since 2.0
Show: