I have user control where I have defined a default inputbinding to allow user to submit form on Ctrl-Enter
<UserControl.InputBindings>
<KeyBinding Key="Enter" Modifiers="Control" Command="{StaticResource SubmitCommand}" />
</UserControl.InputBindings>
I have XamNumericEditor on the control, when the user is focused on that control the inputbinding fails to execute but on any other control (TextBox etc) it works as expected and the command is executed. Anything I can do so the keyboard binding is propagated to the usercontrol.
<igWPF:XamNumericEditor x:Name="_Qty"
Value="{Binding Quantity, ValidatesOnDataErrors=True}"
SpinIncrement="{Binding QuantityIncrement}"
VerticalAlignment="Center"
ToolTip="{x:Static Member=ovf:Descriptions.ORDER_QUANTITY}"
ValueType="System:Int32"
Mask="nnn,nnn,nnn"
PromptChar=""
Format="N0"
SelectAllBehavior="SelectAllCharacters"
SpinButtonDisplayMode="Always"
EditModeStarted="EditModeStarted">
<igWPF:XamNumericEditor.ValueConstraint>
<igWPF:ValueConstraint MinInclusive="0"
MaxInclusive="999999999"
ValidateAsType="Integer32"/>
</igWPF:XamNumericEditor.ValueConstraint>
</igWPF:XamNumericEditor>
Hello acraft,
I have been looking into your issue and have managed to replicate this into an isolated project. It appears that this happens because enter is being used for managing the editor modes. I am currently looking for ways to overcome this. I will keep you updated.
Thanks yes appears to be do with editmode, I tried to set IsAlwaysInEditMode=true which solved the behavior for ctrl-enter, but means that the select all on focus behavior has changed (SelectAllBehavior="SelectAllCharacters"). We want it so whenever the user tabs/mouses into the control it by default selects all and when isAlwaysInEditMode is true then the secondtime you enter the control not all the characters are selected.
thanks