Каков наилучший способ использования встроенных RouteCommands WPF с Caliburn?Могу ли я использовать Caliburn для привязки к RoutedCommands?
Например, в моей оболочке У меня есть меню Правки с пунктом Copy в нем, прикрепленный к стандартной команде, найденной в ApplicationCommands
:
<Menu>
<MenuItem Header="Edit">
<MenuItem Header="Copy"
Command="ApplicationCommands.Copy" />
</MenuItem>
</Menu>
Я хочу этот пункт будет обрабатываться с помощью TextBox
когда он имеет фокус и мои собственные элементы управления, когда у них есть фокус. В моем управлении я могу справиться с Execute
и CanExecute
в коде за счетом создания CommandBinding
:
<UserControl.CommandBindings>
<CommandBinding Command="ApplicationCommands.Copy"
Executed="CopyCommandExecute"
CanExecute="CanCopyCommandExecute" />
</UserControl.CommandBindings>
Есть ли способ, с помощью Caliburn, чтобы справиться с методами в моем ViewModel вместо этого, или перенаправить в другую команду, я разоблачить из ViewModel? Или я об этом ошибаюсь?