Windows apps
Collapse the table of content
Expand the table of content
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Frame.CacheSize Property


Gets or sets the number of pages that can be cached for the frame.

Namespace:  System.Windows.Controls
Assembly:  System.Windows.Controls.Navigation (in System.Windows.Controls.Navigation.dll)

public int CacheSize { get; set; }
<sdk:Frame CacheSize="int"/>

Property Value

Type: System.Int32
The number of pages that can be cached for the frame. The default value is 10.

Dependency property identifier field: CacheSizeProperty

You set the CacheSize property to specify how many pages can be retained in a cache. When a page is cached, an instance of the page is reused for each navigation request rather than re-creating the page for each request.

The CacheSize property is only used when you set the NavigationCacheMode property of the Page class to Enabled. If you set the NavigationCacheMode property to Required, the page is cached regardless of the number of cached pages specified in the CacheSize property. Pages marked as Required do not count against the CacheSize total.


Supported in: 5, 4, 3

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

© 2017 Microsoft