RenderOptions.GetCachingHint(DependencyObject) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns the value of the CachingHint attached property for a specified dependency object.
public:
static System::Windows::Media::CachingHint GetCachingHint(System::Windows::DependencyObject ^ target);
[System.Windows.AttachedPropertyBrowsableForType(typeof(System.Windows.Media.TileBrush))]
public static System.Windows.Media.CachingHint GetCachingHint (System.Windows.DependencyObject target);
[<System.Windows.AttachedPropertyBrowsableForType(typeof(System.Windows.Media.TileBrush))>]
static member GetCachingHint : System.Windows.DependencyObject -> System.Windows.Media.CachingHint
Public Shared Function GetCachingHint (target As DependencyObject) As CachingHint
Parameters
- target
- DependencyObject
The dependency object from which to retrieve the value of the CachingHint attached property.
Returns
The current value of the CachingHint attached property on the specified dependency object.
- Attributes
Exceptions
The specified target
is null
.
Examples
The following example shows how to retrieve the caching hint values for a DrawingBrush.
// Get the caching hint option for the brush.
CachingHint cachingHint = RenderOptions.GetCachingHint(drawingBrush);
if (cachingHint == CachingHint.Cache)
{
// Get the minimum and maximum relative sizes for regenerating the tiled brush.
double minimum = RenderOptions.GetCacheInvalidationThresholdMinimum(drawingBrush);
double maximum = RenderOptions.GetCacheInvalidationThresholdMaximum(drawingBrush);
// Perform action based on cache values...
}
' Get the caching hint option for the brush.
Dim cachingHintOpt As CachingHint = RenderOptions.GetCachingHint(drawingBrush)
If cachingHintOpt = CachingHint.Cache Then
' Get the minimum and maximum relative sizes for regenerating the tiled brush.
Dim minimum As Double = RenderOptions.GetCacheInvalidationThresholdMinimum(drawingBrush)
Dim maximum As Double = RenderOptions.GetCacheInvalidationThresholdMaximum(drawingBrush)
' Perform action based on cache values...
End If
Applies to
See also
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
.NET