In order to achieve your requirement you actually can predefine the duplicate command that has been executed on Ctrl+D
combination. You can do this with the following snippet:
sender, CanExecuteRoutedEventArgs e)
e.CanExecute = true
sender, ExecutedRoutedEventArgs e)
var duplicate =
CommandBinding(DiagramCommands.Duplicate, ExecuteDuplicate, CanExecuteDuplicate);
By doing so you will need to implement custom duplication logic inside the ExecuteDuplicate
() method. Please note that this method will be invoked when the e.CanExecute
is set to True
, otherwise the default duplication logic will be triggered.
Please give this approach a try and let us know if you need any further assistance.
Pavel R. Pavlov
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>