Ejemplo n.º 1
0
        public void Stub04()
        {
            DrawingBrush drawingBrush = new DrawingBrush();

            RenderOptions.SetCacheInvalidationThresholdMinimum(drawingBrush, 0.5);
            RenderOptions.SetCacheInvalidationThresholdMaximum(drawingBrush, 2.0);
            RenderOptions.SetCachingHint(drawingBrush, CachingHint.Cache);

            // <SnippetRenderOptionsSnippet4>
            // 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...
            }
            // </SnippetRenderOptionsSnippet4>
        }