I'm trying to work through this Metro "Hello World" on MSVS 11 Beta, with the Windows 8 Community Preview:
Create Your First Metro Style App using C# or VB
The tutorial asks you to create some "template" pages. For example:
public sealed partial class SplitPage : WindowsBlogReader.Common.LayoutAwarePage
{
...
The tutorial also asks you to override the LoadState() method for some of these pages:
protected override void LoadState(Object navigationParameter, Dictionary<String, Object> pageState)
{
// TODO: Assign a bindable group to this.DefaultViewModel["Group"]
// TODO: Assign a collection of bindable items to this.DefaultViewModel["Items"]
FeedData feedData = navigationParameter as FeedData;
if (feedData != null)
{
this.DefaultViewModel["Feed"] = feedData;
this.DefaultViewModel["Items"] = feedData.Items;
}
...
The problem is that this dies with a nasty compile error:
LoadState(object,System.Collections.Generic.Dictionary<string,object>): no suitable method found to override.
There is no "Page state management" region and no default "LoadState()" method in the auto-generated code for the template (SplitPage.xaml.cs); the tutorial says there should be.
Q: Is LoadState() now deprecated in newer versions of the Metro SDK?
Q: Do I need to do something "magic" in a .xaml file to make this work?
Q: What the heck is going on here?
Thank you very much in advance, if anybody has any suggestions! tutorial also asks you to override the LoadState() method for some of these pages: