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.aspxhttp://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
Hello Thomas,
Thank you for the attached sample application.
I have reviewed it and I believe that the best option for your scenario is to create your own routed command and use that to trigger when invoke Undo/Redo on the UndoManager instead of using Undo/Redo command instance. I have contacted our developers and unfortunately you can not turn off the xamNumericEditor from its undo behavior.
After investigating the this and doing some research, the IsUndoEnabled functionality has been determined to be a product idea. You can suggest new product ideas for future versions (or vote for existing ones) at
http://ideas.infragistics.com
Submitting your idea will allow you to communicate directly with our product management team, track the progress of your idea at any time, see how many votes it got, read comments from other developers in the community, and see if someone from the product team has additional questions for you. Remember when submitting your idea to explain the context in which a feature would be used and why it is needed as well as anything that would prevent you from accomplishing this today. You can even add screenshots to build a stronger case. Remember that for your suggestion to be successful, you need other members of the community to vote for it. You can also link back to this thread for additional details.
Thank you in advance to submitting your product idea.
Sincerely,ZhivkoAssociate Software Developer
Hello Zhivko,
thank you for the quick response.
Please correct me if I'm wrong, but I think creating my own Routed Command would leave me with one big drawback: The KeyBindings would not work while the Editor is in EditMode. Of course I am not only using the Button to trigger Undo, I also want to react on the standard Keybindings.
I hope I have time on Monday to try that, but I'm afraid it's not going to be the final Solution for my Problem.
Regards,Thomas
It seems that the XamNumericEditor is handling OnKeyDown and executing the events himself rather than relying on the input bindings. The best appraoch here is to suggest a new Product Idea for property like IsUndoEnabled.
Please feel free to let me know if you have any other questions.