i create silverlight windows phone 8.1 project and i need to choose all kind of file from windows phone
i used FileOpenPicker for choose the file it redirect correctly and i can choose the file this is my code
FileOpenPicker openPicker = new FileOpenPicker(); openPicker.ViewMode = PickerViewMode.List; openPicker.SuggestedStartLocation = PickerLocationId.DocumentsLibrary; openPicker.FileTypeFilter.Add("*"); openPicker.PickMultipleFilesAndContinue();
And i follow this msdn for receiving select
In my case if i selecting file and come back to the app its every thing working if i without select any file and come back using mobile hardware back button my app come to home screen. but it need to stay file picker page
when i press mobile hardware back button in above screen the page redirect to my first page it need to stay in my second page
thanks
Finally i got the answer and avoid redirection
bool reset;
protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
{
if(reset && e.uri.tostring().Equals("MainPage.xaml"))
{
e.Cancel = true;
reset = false
}
}
protected override void OnNavigatedTo(NavigationEventArgs e)
{
reset = e.NavigationMode == NavigationMode.Reset;
}