Share via


RenderOptions.SetCacheInvalidationThresholdMaximum Método

Definición

Establece el valor de la propiedad adjunta CacheInvalidationThresholdMaximum de un objeto de dependencia especificado.

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)

Parámetros

target
DependencyObject

Objeto de dependencia en el que se establecerá el valor de la propiedad CacheInvalidationThresholdMaximum.

cacheInvalidationThresholdMaximum
Double

Nuevo valor en el que se va a establecer la propiedad.

Excepciones

El target especificado es null.

Ejemplos

En el ejemplo siguiente se muestra cómo usar la opción de sugerencia de almacenamiento en caché para .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)

Comentarios

Utilice este método para establecer la CacheInvalidationThresholdMaximum propiedad adjunta en el código.

Se aplica a

Consulte también