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://es.infragistics.com/community/forums/t/66798.aspx
http://es.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
Parents
  • 16495
    Offline posted

    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,
    Zhivko
    Associate Software Developer

Reply Children