BufferedGraphicsContext.MaximumBuffer 属性

定义

获取或设置要使用的缓冲区的最大大小。Gets or sets the maximum size of the buffer to use.

public:
 property System::Drawing::Size MaximumBuffer { System::Drawing::Size get(); void set(System::Drawing::Size value); };
public System.Drawing.Size MaximumBuffer { get; set; }
member this.MaximumBuffer : System.Drawing.Size with get, set
Public Property MaximumBuffer As Size

属性值

Size

一个 Size,指示缓冲区尺寸的最大大小。A Size indicating the maximum size of the buffer dimensions.

例外

缓冲区大小的高度或宽度小于或等于零。The height or width of the size is less than or equal to zero.

示例

下面的示例演示如何设置缓冲区的最大大小 BufferedGraphicsContextThe following example demonstrates setting the maximum size for the buffer for a BufferedGraphicsContext. 此代码是为类提供的更大示例的一部分 BufferedGraphicsThis 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 );
// 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 = new Size(400, 400);
' 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 = New Size(400, 400)

注解

此属性允许您获取或设置应保留在内存中的缓冲区的最大维度。This property allows you to get or set the maximum dimensions for a buffer that should be retained in memory. 您可以分配任意大小的缓冲区,但任何尺寸大于大小的缓冲区 MaximumBuffer 都将暂时使用,然后在对象释放时被丢弃 BufferedGraphicsYou 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.

适用于