locked
caching in usercontrol xaml c# metro app RRS feed

  • Question

  • Hi  ,

    i have one usercontrol and that usercontrol i am using as flyout in my metro app using c# xaml . now i need to have caching in that Usercontrol at some point of time . i know how to do caching in Page but not getting how to achieve caching in usercontrol . if anyone have idea about that please let me know . thanks in advance .

    Tuesday, October 29, 2013 3:31 PM

Answers

  • Hi,

    Do you mean you want to cache the UserControl content? As far as I know, there is no direct way to implement the UserControl caching. In UserControl, it has a Cachemode property which can Gets or sets a value that indicates that rendered content should be cached as a composited bitmap when possible. But the BitmapCache is the only existing practical derived classes in the Windows Runtime API that enables this behavior.

    If you want to keep the UserControl  content, I suggest you use Local StorageRoaming StorageTemporary Storage, which will help you persist objects within your application. Read this: http://msdn.microsoft.com/en-us/library/windows/apps/hh465099.aspx

    Best Wishes!


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey. Thanks<br/> MSDN Community Support<br/> <br/> Please remember to &quot;Mark as Answer&quot; the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    • Marked as answer by Anne Jing Tuesday, November 5, 2013 9:34 AM
    Wednesday, October 30, 2013 3:50 AM

All replies

  • Could you elaborate a little more on what you need to cache and how you are caching in the page? It should be the exact same concept for a UserControl as a Page.

    Thanks,

    Brad

    Tuesday, October 29, 2013 3:53 PM
  • Hi,

    Do you mean you want to cache the UserControl content? As far as I know, there is no direct way to implement the UserControl caching. In UserControl, it has a Cachemode property which can Gets or sets a value that indicates that rendered content should be cached as a composited bitmap when possible. But the BitmapCache is the only existing practical derived classes in the Windows Runtime API that enables this behavior.

    If you want to keep the UserControl  content, I suggest you use Local StorageRoaming StorageTemporary Storage, which will help you persist objects within your application. Read this: http://msdn.microsoft.com/en-us/library/windows/apps/hh465099.aspx

    Best Wishes!


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey. Thanks<br/> MSDN Community Support<br/> <br/> Please remember to &quot;Mark as Answer&quot; the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    • Marked as answer by Anne Jing Tuesday, November 5, 2013 9:34 AM
    Wednesday, October 30, 2013 3:50 AM