共用方式為


RenderOptions.SetCacheInvalidationThresholdMinimum 方法

定義

設定所指定相依性物件的 CacheInvalidationThresholdMinimum 附加屬性值。

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)

參數

target
DependencyObject

要設定 CacheInvalidationThresholdMinimum 屬性值的相依性物件。

cacheInvalidationThresholdMinimum
Double

要設定屬性的目標新值。

例外狀況

指定的 targetnull

範例

下列範例示範如何使用 的 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)

備註

使用這個方法,在程式碼中設定 CacheInvalidationThresholdMinimum 附加屬性。

適用於

另請參閱