3
private IAsyncOperation<ContentDialogResult> _Task = null;
private ContentDialog _message = null;
_message = new ContentDialog()
{
Content = "Hello",
PrimaryButtonText = "EXIT",
IsPrimaryButtonEnabled = true,
};
_message.PrimaryButtonClick += message_PrimaryButtonClick;
_Task = _message.ShowAsync();
這裏我創建了一個用於內容對話框的任務,以便我可以從代碼明確地關閉ContenDialog。如何防止在Windows Phone 8.1中按Home鍵時關閉ContentDialog?
How can I prevent dialog from closing when Home key is pressed and relaunched