2010-07-07 71 views

回答

2

您可以使用CommandManager.RegisterClassCommandBinding将处理程序连接到每个Window应用程序的范围。这将继续为你的其他应用程序运行起作用,因此将它放在App.xaml.cs中通常是有意义的,但你可以将它放在任何地方。

CommandManager.RegisterClassCommandBinding(typeof(Window), new CommandBinding(ApplicationCommands.Cut, CutExecuted)); 
+0

非常好!有用! – user244980 2010-07-07 04:50:05

相关问题