Skip to content

ElementExtensions.Cached<T> method

Enables (or disables) bitmap caching of the element’s rendered output. The cached bitmap is blitted each frame until the element’s content, size, or DPI changes; the visual tree stays live. Equivalent to assigning a BitmapCache to CacheMode.

public static T Cached<T>(this T element, bool cached = true)
where T : UIElement
parameter description
T Visual type.
element Target element.
cached Whether to enable bitmap caching.

The element for chaining.