windows phone 7 - Catching pressing "Back" button in mvvmlight -


how can move

protected override void onbackkeypress(system.componentmodel.canceleventargs e)  

to viewmodel , still able control "back'ing"? in codebehind, can use e.cancel = true;, how use in viewmodel?

you can't bind isn't bindable per say. can either create fake binding using behavior<t>, not point in that.

instead forward event in viewmodel, doing like:

e.oncancel = viewmodel.onbackkeypress(); 

and have onbackkeypress() return bool.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

javascript - Clean way to programmatically use CSS transitions from JS? -

android - send complex objects as post php java -