Question

Force numeric edit boxes to attempt to update binding source

Posted 1 year ago by Avatar Boleslaw

Hello,

Is there a way to force (programatically) part edit boxes (Int32EditBox, DoubleEditBox, etc.) to take the latest value currently typed and attempt to update the binding source with that value (or committ the value)? For something like the regular WPF TextBox, I can just simply retrieve the binding expression for its Text property and call UpdateSource even though the TextBox is using the LostFocus trigger, but this did not work for the Actipro edit boxes (I do understand that the Actipro edit boxes are significantly more complex than the WPF TextBox). Note that I am still working with legacy editors and cannot update at this time.

Thank you


Comments (2)

Posted 1 year ago by Actipro Software Support - Cleveland, OH, USA

Hello,

In the old Editor's edit boxes (pre-2017.1), each part had a CommitPendingChanges() method.  You might be able to find a part, by going through the edit box's DefaultItems collection, going into an Int32PartGroup, and going through its DefaultItems to the Int32Part.  Something along those lines.

Incidentally, the new Editors's edit boxes (post-2017.1 where everything is a lot simpler) all have a Commit() method you can call to commit pending text updates.


Actipro Software Support
Posted 1 year ago by Boleslaw

Thank you, this is exactly what I was looking for. I can step through the visual tree and find ActiproSoftware.Windows.Controls.Editors.Part objects to invoke their CommitPendingChanges method. We should be able to update to the newer releases soon hopefully, the new Commit method would be one of the many nice things I am looking forward to working with in there.

[Modified 1 year ago]

Information The latest build of this product (2018.1 build 0673) was released 1 month ago, which was after the last post in this thread.

Add a Comment

Please log in to a validated account to post comments.