internal static void CustomTextBox_KeyDown(object sender, KeyEventArgs e) { if (e.Key == Key.Enter) { EditTitleBar.HandleRename(); } else if (e.Key == Key.Escape) { EditTitleBar.Refocus(); FileHandling.Open_Save.IsDialogOpen = true; // Hack to make escape not fall through } }
internal static void CustomTextBox_KeyDown(object sender, KeyEventArgs e) { switch (e.Key) { case Key.Enter: EditTitleBar.HandleRename(); break; case Key.Escape: EditTitleBar.Refocus(); FileHandling.Open_Save.IsDialogOpen = true; // Hack to make escape not fall through break; } }