windows phone 7 - OnBackKeyPress going to another instance of a page -


is there way handle onbackkeypress in such way returns actual page in back-stack instead of going instance of same page? code have:

protected override void onbackkeypress(system.componentmodel.canceleventargs e) {     e.cancel = true;      base.onbackkeypress(e);      this.navigationservice.navigate(new uri("/mainpage.xaml", urikind.relative)); } 

but doesn't want. there way without using navigationservice , getting actual page in back-stack instead?

thanks.

the short answer no can't that. other using navigationservice move backwards page page there no way manipulate stack. rightly or wrongly design. , kind of makes sense need sure operation of button consistent.

what trying change behavior of button. not onbackkeypress intended for. wp7 design guide says following button:

the button can close on-screen keyboard, menus, dialogs, navigate previous page, exit search operation or switch between applications. principal usage move current screen previous screen.

if scenario not covered in above suggest maybe trying fundamentally in consistent microsoft's intentions button.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

html - Instapaper-like algorithm -

c# - How to execute a particular part of code asynchronously in a class -