# How do I create an efficient long, pannable, sprite-animated scene in a Windows Store game?

I am creating my first Windows Store application in XAML, and I cannot seem to find a proper example for the requirements I have.

The basic idea of the app is to have a large scrollable canvas which would lazily start animating visible parts of the view as soon as user stops panning over a certain content (with some audio played also):

My original idea was to use a StackPanel to add a bunch of custom controls, each of which would then animate itself once visible (with a short delay), but I have a couple of concerns:

1. If the entire canvas is ~50 screen widths wide, is it feasible to load all content at the beginning, or do I need to plan doing some lazy loading during scrolling? For example, when I select a certain region in the Bing Travel app, it seems to lazily load tiles as I scroll it towards the end.

2. Since content is stretched 100% vertically, and these animations are vectorized to be resolution independent, I am not sure if XAML (CompositionTarget) will be able to handle this, or I have to go for DirectX (MonoGame or C++) to get rid of flicker.

3. Even better, is there an example for Windows 8 which uses a 100% vertically sized GridView with custom animated controls inside?

• Thanks. Although, it seems like in Windows 8.1 the SwapChainBackgroundPanel has become pretty much obsolete with the introduction of the SwapChainPanel class. – Groo Nov 12 '13 at 13:24