BufferedGraphicsContext.MaximumBuffer 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取或设置要使用的缓冲区的最大大小。
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,指示缓冲区尺寸的最大大小。
例外
缓冲区大小的高度或宽度小于或等于零。
示例
以下示例演示如何设置 缓冲区 BufferedGraphicsContext的最大大小。 此代码是为 类提供的更大示例的 BufferedGraphics 一部分。
// 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)
注解
此属性允许获取或设置应在内存中保留的缓冲区的最大维度。 可以分配任何大小的缓冲区,但维度大于该 MaximumBuffer 大小的缓冲区将暂时使用,然后在释放对象时 BufferedGraphics 放弃。