現在、私が持っているのは、ユーザーがページをクリックすると、ページが自動的にPDFファイルを開くWebタスクにユーザーを送ります。ナビゲーションループとバックスタックのクリア
今の状況は、ユーザーが戻るボタンを押したときに、元のページに戻ってから1秒間だけ元のページに戻ってから、pdfにリダイレクトされます(onnavigateto関数のため)。
ユーザーがpdfドキュメントの戻るボタンをクリックすると、ユーザーはメインページに戻ります。
また、メインページで、バックスタックがクリアされていることを確認するにはどうすればよいですか? (アプリケーションが持っているのメインページに終了しますので、PDFに戻ることはできません。)すべての
マイコードは、これまでのところ、私が試してみました...
{
public partial class Page2 : PhoneApplicationPage
{
public Page2()
{
InitializeComponent();
}
//as soon as this page is opened, navigate/redirect it to the URL below
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
{
base.OnNavigatedTo(e);
WebBrowserTask task = new WebBrowserTask() { URL ="http://test.com/test.pdf"};
task.Show();
}
//when the user clicks the hardware back button, instead of taking them to the daily notices, which will send them back to brower
// send the user to the main page
protected override void OnBackKeyPress
(System.ComponentModel.CancelEventArgs e)
{
base.OnBackKeyPress(e);
new Uri("/MainPage.xaml", UriKind.Relative);
}