Wpf Dialogs [cracked] Here

MessageBoxResult result = MessageBox.Show( "Do you want to overwrite the existing file?", "Confirm Overwrite", MessageBoxButton.YesNoCancel, MessageBoxImage.Warning, MessageBoxResult.Cancel );

Setting the Owner property ( dialog.Owner = this; ) is mandatory for a good UX. It ensures the dialog minimizes/restores with the parent window and centers itself correctly. WPF Dialogs

public bool Confirmed get; set; public T Data get; set; MessageBoxResult result = MessageBox