BufferedGraphicsContext.MaximumBuffer Egenskap

Definition

Hämtar eller anger den maximala storleken på bufferten som ska användas.

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

Egenskapsvärde

En Size som anger den maximala storleken på buffertdimensionerna.

Undantag

Storlekens höjd eller bredd är mindre än eller lika med noll.

Exempel

I följande exempel visas hur du anger den maximala storleken för bufferten för en BufferedGraphicsContext. Den här koden är en del av ett större exempel som tillhandahålls BufferedGraphics för klassen.

// 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)

Kommentarer

Med den här egenskapen kan du hämta eller ange maximala dimensioner för en buffert som ska behållas i minnet. Du kan allokera en buffert av valfri storlek, men alla buffertar med dimensioner som är större än MaximumBuffer storleken används tillfälligt och ignoreras sedan när BufferedGraphics objektet släpps.

Gäller för

Se även