2012-11-16 44 views

回答

1

我要做什麼,這是我app.xmal.cs文件`

private void Application_Launching(object sender, LaunchingEventArgs e) 
    { 
     SetupDefautPage(); 
    } 

    private void Application_Activated(object sender, ActivatedEventArgs e) 
    {    
     SetupDefautPage(); 
    }` 

和我的空虛SetupDefautPage這個樣子的:

void SetupDefautPage() 
    { 
     if ((DefaultPage !=false)&&(DefaultPage !=true)) 
     { 
      (Application.Current as App).DefaultPage = false; 
     } 

     if (DefaultPage==false) 
     { 
      ((App)Application.Current).RootFrame.Navigate(new Uri("/TermUsePage.xaml", UriKind.Relative)); 
     } 
     else if(DefaultPage==true) 
     { 
      ((App)Application.Current).RootFrame.Navigate(new Uri("/MainPage.xaml", UriKind.Relative)); 
     } 


    } 

這只是一個想法,我希望這是好的對你而言

相關問題