RenderOptions.SetCacheInvalidationThresholdMinimum Method

Definition

Sets the value of the CacheInvalidationThresholdMinimum attached property on a specified dependency object.

C#
public static void SetCacheInvalidationThresholdMinimum(System.Windows.DependencyObject target, double cacheInvalidationThresholdMinimum);

Parameters

target
DependencyObject

The dependency object on which to set the value of the CacheInvalidationThresholdMinimum property.

cacheInvalidationThresholdMinimum
Double

The new value to set the property to.

Exceptions

The specified target is null.

Examples

The following example shows how to use the caching hint option for a DrawingBrush.

C#
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);

Remarks

Use this method to set the CacheInvalidationThresholdMinimum attached property in code.

Applies to

Product Versions
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

See also