RenderOptions.SetCacheInvalidationThresholdMinimum Metodo

Definizione

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

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

Parametri

target
DependencyObject

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

cacheInvalidationThresholdMinimum
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 CacheInvalidationThresholdMinimum proprietà associata nel codice.

Si applica a

Vedi anche