Question

Int32EditBox - Built-In vs App UndoHistory

Posted 12 days ago by Avatar Justin Klein

In my application, I've implemented my own UndoRedo history/framework. I track changes to relevant properties, controls, etc.  Everything works great, except it seems like Actipro's Int32EditBoxes have their "own" internal UndoRedo history that's superceding my global one.  What I mean is, if I change the value in an Int32EditBox, then it Ctrl-Z while focus remains in that UI element, the value gets undone but it's not seen by my program-wide undoredo history. If I modify the value of the Int32EditBox then explicitly take its focus away, Ctrl-Z works as intended (as it does for all other controls in my app).

Presumably there's just a property that needs to be changed to tell Int32EditBox not to use its 'own' undoredo implementation, so my global Ctrl-Z will work without having to explicitly take away focus from that control?

Thanks in advance :)

Information The latest build of this product (2018.1 build 0671) was released 1 month ago, which was before this thread was created.

Comments (2)

Posted 12 days ago by Actipro Software Support - Cleveland, OH, USA

Hi Justin,

Actually the edit boxes in the newer versions of Editors use a regular WPF TextBox as the editing portion of their template.  So it's Microsoft's own internal TextBox undo/redo system at work there.  

I did an internet search and found this:

https://social.msdn.microsoft.com/Forums/vstudio/en-US/376f7765-1c70-4289-a59b-e27c168a0fa2/disabling-undo-for-a-textbox?forum=wpf

If you can walk the visual tree and get the TextBox within the control, perhaps something along the lines of the post above might help?


Actipro Software Support
Posted 11 days ago by Justin Klein

Aha, thanks - I'll look into that & see if I can figure something out :)


Add a Comment

Please log in to a validated account to post comments.