Windows phone 8.1 在Windows phone 8.1中按home键时,如何防止ContentDialog关闭。。?
要防止对话框关闭,请处理其事件并在其参数中设置为true 初始化对话框时:Windows phone 8.1 在Windows phone 8.1中按home键时,如何防止ContentDialog关闭。。?,windows-phone-8.1,messagedialog,Windows Phone 8.1,Messagedialog,要防止对话框关闭,请处理其事件并在其参数中设置为true 初始化对话框时: How can I prevent dialog from closing when Home key is pressed and relaunched 事件处理程序: myContentDialog.Closing += ContentDialog_Closing; myContentDialog.Closing += ContentDialog_Closing; void ContentDialog_
How can I prevent dialog from closing when Home key is pressed and relaunched
事件处理程序:
myContentDialog.Closing += ContentDialog_Closing;
myContentDialog.Closing += ContentDialog_Closing;
void ContentDialog_Closing(ContentDialog sender, ContentDialogClosingEventArgs args)
{
if (doNotClose)
{
args.Cancel = true;
}
}