0
Folowing、Windowsの携帯電話に押されたときに閉じるからContentDialogを防ぐためにどのように私はバックキー が押されたときに失われないために使用しています私のコードである、しかし、それはまた、「ブロッキング「はい」とされます コンテンツダイアログの「いいえ」ボタンをクリックします。何が理由だろうか?**は、ホームキーは8.1
dialog = new ContentDialog()
{
Title = "One basta found",
//RequestedTheme = ElementTheme.Dark,
//FullSizeDesired = true,
MaxWidth = this.ActualWidth // Required for Mobile!
};
// Setup Content
var panel = new StackPanel();
panel.Children.Add(new TextBlock
{
Text = file.Name+" is found. Do you want to add it?",
TextWrapping = TextWrapping.Wrap,
});
dialog.Content = panel;
// Add Buttons
dialog.PrimaryButtonText = "Yes";
dialog.IsPrimaryButtonEnabled = true;
dialog.Closing += ContentDialog_Closing;
void ContentDialog_Closing(ContentDialog sender, ContentDialogClosingEventArgs args)
{
args.Cancel = true;
}