Force numeric edit boxes to attempt to update binding source

Editors for WPF Forum

Posted 6 years ago by Boleslaw
Version: 16.1.0632
Avatar

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 6 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

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 6 years ago by Boleslaw
Avatar

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 6 years ago]

The latest build of this product (v24.1.2) was released 0 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.