Silverlight Frame导航

1 <Border Name="Frame" Grid.Column="1" Style="{StaticResource ContentBorderStyle}">
2 <navigation:Frame x:Name="mainFrame"></navigation:Frame>
3 </Border>

导航的代码:

 IsolatedStorageSettings appSettings = IsolatedStorageSettings.ApplicationSettings;
if (appSettings.Contains("state"))
{
appSettings["state"] = "1";
}
else
{
appSettings.Add("state", "1");
}
mainFrame.Navigate(new Uri("/Views/TaskList.xaml", UriKind.Relative));

其中:/表示进入工程的根目录,

    IsolatedStorageSettings:整个程序共享的一个资源



posted @ 2011-12-02 09:58  lanmiao  阅读(634)  评论(0编辑  收藏  举报