BufferedGraphicsContext.MaximumBuffer 屬性

定義

取得或設定要使用之緩衝區的大小上限。

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 指出緩衝區維度的最大值。

例外狀況

大小的高度或寬度小於或等於零。

範例

下列範例示範如何設定 緩衝區 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 捨棄。

適用於

另請參閱