I finally found the code I created when I ported Mike Snow’s Silverlight snowflake “game” into a Windows 8 C#/XAML “game.” https://jimblizzard.wordpress.com/2012/05/18/porting-a-simple-silverlight-game-loop-to-windows-8-metro-style/
(Yes I had checked my Release Preview-based code into Team Foundation Service, but I couldn’t remember which project I’d put it in. And I’ve rebuilt all my machines onto RTM bits, so I didn’t have a local copy. But, there it was, sitting right where I’d left it on the server. I love the Team Foundation Service in the sky.)
OK. Where was I?
For some reason in my previous version when I created the project I wound up with the files that are included for layout aware pages. (Code that helps wire up a page to respond to Snapped, Filled, Portrait, and Landscape view changes.) Anyway, there was a change from RP to RTM that affected ApplicationViewStateChangedEventArgs and ApplicationView.GetForCurrentView(), both of which are used in LayoutAwarePage.cs…. One of those files that’s part of the layout aware pages code that your project can leverage.
I took the easy route and created a new Blank C# Windows Store Application and copied my code from the RP version into the new project. And it worked without any changes. So now I yet again have a running snowstorm game in Windows 8.
Time to write a game of my own: perhaps using the accelerometer to send the snow moving left or right, or using the Shake event to allow the user to make it look like a snow globe that’s been shaken. And of course I’ll add ways to do this via touch, keyboard or mouse, for those who don’t have those device sensors.
Stay tuned. . .