2
在我的應用我做了這個映射我的app.xaml.cs URI,現在的事情是,如果我的應用程序停用在MainPage.xaml中,而不是Eula.xaml我的應用程序退出。否則,該應用會在其啓動的同一頁面上退出。 在App.xaml中Windows Phone 7後退按鈕和應用程序墓碑?
<UriMapper:UriMapper x:Name="mapper">
<UriMapper:UriMapping Uri="/MainPageOrEULA.xaml"/>
</UriMapper:UriMapper>
和App.xaml.cs
// Get the UriMapper from the app.xaml resources, and assign it to the root frame
UriMapper mapper = Resources["mapper"] as UriMapper;
RootFrame.UriMapper = mapper;
// Update the mapper as appropriate
IsolatedStorageFile isoStorage = IsolatedStorageFile.GetUserStoreForApplication();
if (isoStorage.FileExists("DataBase/MyPhoneNumber.txt"))
{
mapper.UriMappings[0].MappedUri = new Uri("/MainPage.xaml", UriKind.Relative);
}
else
{
mapper.UriMappings[0].MappedUri = new Uri("/EULA.xaml", UriKind.Relative);
}
請指引我一樣。
Regards,
Panache。
UriMappers並非意在以這種方式使用。你究竟在努力實現什麼? – 2011-03-03 09:32:19
@馬特萊西,我試圖啓動一次我EULA.xaml頁面時,應用程序是首次推出,有後,我要開始我的MainPage.xaml中的應用程序,我得到這個功能,但是按照認證準則的應用程序應它開始在頁面上退出右它就像明智的,但如果我的應用程序墓碑後退導航的行爲就像Mainpage-> FirstPage->退出應該是這樣MainPage-> EULA->退出。謝謝.. – Panache 2011-03-03 10:44:09
@馬特萊西,http://stackoverflow.com/questions/4463085/how-to-navigate-eula-and-mainpage – Panache 2011-03-03 10:50:48