Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
190
Disabling Undo/Redo in XamNumericEditor
posted

Hello,

I have a Problem implementing my Undo/Redo.

I'm using the UndoManager in the Viewmodel to implement Undo/Redo functionality. To achive that I use the AddPropertyChanged Method in the Properties of my Viewmodel.
In the View I have a Toolbar with Buttons for Undo/Redo hooked up with the corresponding ApplicationCommands.

Now my Problem:
If the XamNumericEditor is in EditMode it catches the the ApplicationCommands before I get them in the ViewModel. Thus I can't handle them myself.

I need to stop the XamNumericInput from intercepting the ApplicationCommands for Undo and Redo, just like I would do with the IsUndoEnabled Property of a Textbox.

On my search for a solution I found only few posts, but none of them works for me.
http://ko.infragistics.com/community/forums/t/66798.aspx
http://ko.infragistics.com/community/forums/p/37758/219144.aspx#219144 

Also I can't use the PreviewCanExecute and PreviewExecuted Events as I'm stacking Views on top of each other and need the topmost Views Viewmodel to handle the Event.

I Attached a sample to show the Effect.
As you can see there the Undo Button is enabled as soon as you start Typing in the Editor.

Regards

Thomas Stüven 

DissableXamNumericInputUndoRedo.zip