I am attempting to have a ribbon ButtonTool emulate the behavior that occurs when the user presses the escape key when in edit mode. I cannot figure out how to manage this, though.
I have a UserControl on top, which has the XamRibbon. I have another UserControl beneath it, which has the XamGrid.
I'd like to do this the MVVM way, and avoid codebehind.
What am I missing? Is this doable?
Thanks.
Hi,
You can use Commanding with the xamRibbon: http://blogs.infragistics.com/blogs/devin_rader/archive/2011/07/12/extending-a-xamribbon-buttontool-to-execute-icommands.aspx
The other option is using the infragistics commanding framework: http://blogs.infragistics.com/silverlight/articles/custom-commands-with-infragistics-silverlight-commanding-framework.aspx
An example:http://community.infragistics.com/forums/t/49311.aspx
However, you will need to know about the xamGrid in order to actually call exitEditMode on it.
-SteveZ