RenderOptions.SetCacheInvalidationThresholdMaximum Metodo

Definizione

Imposta il valore della CacheInvalidationThresholdMaximum proprietà associata in un oggetto di dipendenza specificato.

public:
 static void SetCacheInvalidationThresholdMaximum(System::Windows::DependencyObject ^ target, double cacheInvalidationThresholdMaximum);
public static void SetCacheInvalidationThresholdMaximum(System.Windows.DependencyObject target, double cacheInvalidationThresholdMaximum);
static member SetCacheInvalidationThresholdMaximum : System.Windows.DependencyObject * double -> unit
Public Shared Sub SetCacheInvalidationThresholdMaximum (target As DependencyObject, cacheInvalidationThresholdMaximum As Double)

Parametri

target
DependencyObject

Oggetto dipendenza da cui impostare il valore della CacheInvalidationThresholdMaximum proprietà.

cacheInvalidationThresholdMaximum
Double

Nuovo valore su cui impostare la proprietà.

Eccezioni

L'oggetto specificato target è null.

Esempio

Nell'esempio seguente viene illustrato come usare l'opzione di suggerimento per la memorizzazione nella cache per un DrawingBrush.

DrawingBrush drawingBrush = new DrawingBrush();
            
// Set the caching hint option for the brush.
RenderOptions.SetCachingHint(drawingBrush, CachingHint.Cache);

// Set the minimum and maximum relative sizes for regenerating the tiled brush.
// The tiled brush will be regenerated and re-cached when its size is
// 0.5x or 2x of the current cached size.
RenderOptions.SetCacheInvalidationThresholdMinimum(drawingBrush, 0.5);
RenderOptions.SetCacheInvalidationThresholdMaximum(drawingBrush, 2.0);
Dim drawingBrush As New DrawingBrush()

' Set the caching hint option for the brush.
RenderOptions.SetCachingHint(drawingBrush, CachingHint.Cache)

' Set the minimum and maximum relative sizes for regenerating the tiled brush.
' The tiled brush will be regenerated and re-cached when its size is
' 0.5x or 2x of the current cached size.
RenderOptions.SetCacheInvalidationThresholdMinimum(drawingBrush, 0.5)
RenderOptions.SetCacheInvalidationThresholdMaximum(drawingBrush, 2.0)

Commenti

Utilizzare questo metodo per impostare la CacheInvalidationThresholdMaximum proprietà associata nel codice.

Si applica a

Vedi anche