RenderOptions.SetCacheInvalidationThresholdMinimum Metoda

Definicja

Ustawia wartość dołączonej CacheInvalidationThresholdMinimum właściwości na określonym obiekcie zależności.

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)

Parametry

target
DependencyObject

Obiekt zależności, na którym należy ustawić wartość CacheInvalidationThresholdMinimum właściwości.

cacheInvalidationThresholdMinimum
Double

Nowa wartość ustawiania właściwości na .

Wyjątki

Określona target wartość to null.

Przykłady

W poniższym przykładzie pokazano, jak użyć opcji wskazówek buforowania dla elementu 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)

Uwagi

Użyj tej metody, aby ustawić dołączoną CacheInvalidationThresholdMinimum właściwość w kodzie.

Dotyczy

Zobacz też