Main windows closes on ESC key

Topics: Questions
Feb 7, 2013 at 8:36 AM
Edited Feb 7, 2013 at 8:37 AM

my main window closes when I hit the ESC key. How can I disable this. My main window has the following constructor:
public MainWindow(MainViewModel mainViewModel)
            : base(mainViewModel, DataWindowMode.Custom, defaultButton: DataWindowDefaultButton.None)
I have no buttons on this window.

Thanks for any info,
Feb 7, 2013 at 1:38 PM
Good question. We implemented that because it's a "standard" behavior of windows in ms windows. But, you can override OnKeyDown. If Escape, set e.Handled to true.
Aug 1, 2013 at 3:56 PM
Please provide a property to indicates close on escape or not, that can be set in xaml.
Aug 1, 2013 at 9:03 PM
Please add the feature request here: