Sdílet prostřednictvím


RenderOptions.SetCacheInvalidationThresholdMaximum Metoda

Definice

Nastaví hodnotu CacheInvalidationThresholdMaximum připojené vlastnosti u zadaného objektu závislosti.

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)

Parametry

target
DependencyObject

Objekt závislosti, na kterém chcete nastavit hodnotu CacheInvalidationThresholdMaximum vlastnosti.

cacheInvalidationThresholdMaximum
Double

Nová hodnota pro nastavení vlastnosti.

Výjimky

target Zadané je null.

Příklady

Následující příklad ukazuje, jak použít možnost nápovědy pro ukládání do mezipaměti pro 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)

Poznámky

Tuto metodu CacheInvalidationThresholdMaximum použijte k nastavení připojené vlastnosti v kódu.

Platí pro

Viz také