Search code examples
xamlwindows-runtimepreview

WinRT XamlControl Preview Image


I got a C# WinRT MetroApp Project...

I have a Overview of Items implemented with a GridView looking like this: Overview

If i click on one of these Items i get a DetailView of the item like this:Detail

The Content of the DetailView is a Custom XAML Control. I do want to have a samll Preview of each of my DetailView in the Overview Items..

My question is: Whats the best way to do this in WinRT and how? Is it possible to render an Image of my custom XAML Control in winRT ?

please help me!!


Solution

  • There is no built-in or otherwise easy way to render XAML controls to an image unless you have a fairly basic layout. You could package icons of your controls with the app if there is a limited number of these or if the state of your control keeps changing and you don't have too many of these controls - you could simply put a scaled version of your control in your GridViewItems.