开发者

WP7 fragment error

For a Windows Phone 7 app, I have created an application bar which is common for all my pages and is defined inside App.xaml

For eg. the buttons are Home, Help, About Now, when I start my application, the default page is Home.xaml and the application bar is displayed. When I click Help or About buttons, the navigation is performed using NavigationService and the corresponding page is displayed. But, if I click Home button, an exception is thrown - No Fragment Support at this time.

I found some sugge开发者_运维知识库stions where a unique querystring needs to be appended if you are trying to navigate to the same page. Are there any other better solutions?

Also, can anyone suggest any techniques to keep such code in one place so I don't have to repeat this logic on every page for which there is an app bar icon.

Pratik


Mark Chamberlain confirms you can't do this here.

Unique query string is the way around this. Perhaps add something as a query that is an indication of what makes the next instance of this page different.

Alternatively, you could just refresh the content in your page if that is applicable.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜