Silverlight windows phone 8.1 所有文件的 FileOpenPicker 继续不工作

Silverlight windows phone 8.1 FileOpenPicker for all files Continue not working

我创建了 silverlight windows phone 8.1 项目,我需要从 windows phone 中选择所有类型的文件

我使用 FileOpenPicker 选择它正确重定向的文件,我可以选择文件这是我的代码

       FileOpenPicker openPicker = new FileOpenPicker();
        openPicker.ViewMode = PickerViewMode.List;
        openPicker.SuggestedStartLocation = PickerLocationId.DocumentsLibrary;

        openPicker.FileTypeFilter.Add("*");
        openPicker.PickMultipleFilesAndContinue();

我关注 this msdn 接收 select

以我为例 如果我 selecting 文件并返回应用程序,它的一切正常 如果我没有 select 任何文件并使用移动硬件后退按钮返回,我的应用程序会回到主屏幕。 但它需要留在文件选择器页面

我的第一页

当我在上面的屏幕中按下移动硬件后退按钮时,页面重定向到我的第一页它需要留在我的第二页

谢谢

终于得到答案,避免重定向

 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;
        }