Created
January 22, 2013 16:22
-
-
Save LambdaSix/4595995 to your computer and use it in GitHub Desktop.
To prevent ListPicker from raising BackKeyPress on your views. Otherwise, navigating back from a listpicker full screen mode will raise the key back event as if the page had actually gone back.
This is probably true for any other controls that open something to fill the screen (LongListSelector, etc)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RootFrame.BackKeyPress += (o, args) => | |
{ | |
if (o is PhoneApplicationFrame) | |
{ | |
var j = o as PhoneApplicationFrame; | |
var listPicker = "/Microsoft.Phone.Controls.Toolkit;component/ListPicker/ListPickerPage.xaml"; | |
if (j.Source.OriginalString == listPicker) | |
{ | |
return; | |
} | |
} | |
WizardManager.Instance.Decrement(); | |
Debug.WriteLine("Notifying WizardManager of BackEvent"); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment