Skip to content

Commit c9539e3

Browse files
authored
Update IFCExport.xaml.cs
1 parent fda58fc commit c9539e3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Source/IFCExporterUIOverride/IFCExport.xaml.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,8 @@ public IFCExport(Autodesk.Revit.UI.UIApplication app, IFCExportConfigurationsMap
248248
SetParent(app.MainWindowHandle);
249249

250250
InitializeComponent();
251+
// When user press escape key it will close the window
252+
PreviewKeyDown += (s, e) => { if (e.Key == System.Windows.Input.Key.Escape) Close(); };
251253

252254
currentSelectedSetup.SelectionChanged -= currentSelectedSetup_SelectionChanged;
253255

@@ -838,4 +840,4 @@ private void ChildWindow_ContentRendered(object sender, EventArgs e)
838840
currentSelectedSetup.SelectionChanged += currentSelectedSetup_SelectionChanged;
839841
}
840842
}
841-
}
843+
}

0 commit comments

Comments
 (0)