Windows.UI.Xaml.Media.BitmapCache
June 22, 2022 ยท View on GitHub
-description
Represents the behavior of caching a visual element or tree of elements as bitmap surfaces.
-remarks
This class is infrastructure, and provides the underlying run-time value for the behavior when you specify CacheMode="BitmapCache" in XAML markup, or create a new BitmapCache in code to set UIElement.CacheMode.
-examples
Use any of these syntax forms to set UIElement.CacheMode to a value other than the null default. Don't do this routinely without testing first, see "Remarks" in UIElement.CacheMode.
<Canvas CacheMode="BitmapCache">
...
</Canvas>
canvas1.CacheMode = new BitmapCache(); //canvas1 is an existing named element in UI
// <Canvas x:Name="canvas1"/>
#include <winrt/Windows.UI.Xaml.Media.h>
...
canvas1().CacheMode(Windows::UI::Xaml::Media::BitmapCache{});
canvas1->CacheMode = ref new BitmapCache(); //canvas1 is an existing named element in UI
-see-also
UIElement.CacheMode, IsOverdrawHeatMapEnabled, Optimize your XAML markup