我有这个使用CommandBinding的控件(
WPF),它被注册如下:
CommandBinding binding = new CommandBinding(ApplicationCommands.Delete, OnDeleteExecuted, CanExecuteDelete);
CommandManager.RegisterClassCommandBinding(typeof(MyObject), binding);
所以,当我卸载控件时,我想清除这个绑定.我该怎么办呢?
谢谢!