RoutedUICommand and Cinch

Oct 21, 2011 at 9:27 PM

Just wondering if there is an example of how to use the RoutedUICommand with a Cinch ViewModel.  I have a ribbon control (ActiPro) that uses RoutedCommands called 'RibbonCommands' similar to the Microsoft ribbon.  I found something from Josh Smith ( that I plugged into my Cinch ViewModel and it works, but I would rather not have to implement another interface in my ViewModel if I can avoid it. Is there a pure Cinch solution?


Patrick Duffy

Oct 24, 2011 at 7:48 AM
Edited Oct 24, 2011 at 7:49 AM

There is not really a pure Cinch solution for this, you have 3 choices really

1. Use Joshs approach

2. Use Input Bindings which allow gestures to be applied, and bind to standard Cinch SimpleCommand (Best of both worlds)

3. Use the Cinch ViewAwareStatus service and add extra interface on your view and expose the CommandBindings and then simply add new RoutedCommands in your viewmodel via the exposed View (via the ViewAwareStatus service) CommandBindings collection. Do not forget to remove these though. You can see Bill Kempf Onyx project for an idea of how this works (simliar idea) :

I also wrote a small demo Onyx article before I had my own MVVM framework (AKA Cinch) :


If you use option 3 you may want to ask Bill Kempf about that approach, I will not support any issues raised by that, as it is my least favourite option, as I do not know the full ins/outs of that approach