簡體   English   中英

從phonegap應用程序的MainPage.xaml.cs切換html頁面

[英]Switching the html page from the MainPage.xaml.cs of a phonegap application

在Windows 8版本的phonegap應用程序中,我試圖使用應用程序欄切換到某些頁面。 以下代碼將不構成要導航到的有效URI。 如果有人有解決方法或使該特定代碼起作用的方法,將不勝感激。

private void ApplicationBarIconButton_Click(object sender, EventArgs e)
{
    try
    {
        if (button.Text == "Logout")
        {
        IsolatedStorageSettings.ApplicationSettings.Remove("UserName");
        IsolatedStorageSettings.ApplicationSettings.Remove("Password");
        NavigationService.Navigate(new Uri("/www/index.html", UriKind.Absolute)); 
        }

    }
    catch (Exception ex)
    {
    string esfjdlkfj; //placeholder
    }

}

如果正在使用jQuery Mobile,則可以使用invoke進行調用

$.mobile.changePage("index.html", {transition : "none" });

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM