Enter key doesn't work on DoubleEditBox

Editors for WPF Forum

Posted 12 years ago by BLANC Stéphane - Staubli Robotics Suite Product Manager, STAUBLI
Version: 11.2.0552

I have a problem with the DoubleEditBox : the enter key is not validating the input.
I found on this forum that the PartValueCommitTriggers should solve the problem but it's not working for me... ?

Value="{Binding Value, ElementName=marker, StringFormat=0.0}"
SpinnerInactiveVisibility="Hidden" SpinnerVisibility="Hidden"
Focusable="True" Format="F2"
I will also like to know how to change the default background color when the control has the focus ?

Thanks for your help


Comments (2)

Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Hi Stéphane,

What do you mean when you say validating the input? The PartValueCommitTriggers control when the various parts (which in the case of DoubleEditBox there is only one) will update the Value property of the associated edit box. What happens after that depends on the binding/event handlers you have hooked up. The Binding you have will not update the marker's Value property until the focus is lost. You would need to add UpdateSourceTrigger=PropertyChanged in order to update it immediately.

If you are using the latest version then you can customize the asset AssetResourceKeys.EditBackgroundFocusedBrushKey, like so:
<SolidColorBrush x:Key="{x:Static themes:AssetResourceKeys.EditBackgroundFocusedBrushKey}" Color="Red" />

Actipro Software Support

Posted 12 years ago by BLANC Stéphane - Staubli Robotics Suite Product Manager, STAUBLI
Thank you. The problem came from my binding.
Adding "UpdateSourceTrigger=PropertyChanged" solves the problem

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

Add Comment

Please log in to a validated account to post comments.