2015-04-04 30 views
0

如何在頁面打開時顯示消息框?這是我的WP項目的代碼,但我想知道它的WinRT版本。在Windows RT中打開頁面時顯示消息框

protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) 
    { 
     base.OnNavigatedTo(e); 

     CustomMessageBox messageBox = new CustomMessageBox() 
     { 
      Caption = "", 
      Message = "", 
      LeftButtonContent = "ok" 
     }; 

     messageBox.Show(); 
    } 

回答