Is there any way to define a style/trigger/template that will cause a textbox to lose focus once the Enter key is pressed? Preferably, without using any code...
Thanks!
Is there any way to define a style/trigger/template that will cause a textbox to lose focus once the Enter key is pressed? Preferably, without using any code...
Thanks!
No, there's nothing baked into WPF to do that. You'd have to add some sort of custom code to look for the Enter key and move the focus manually.
The easiest way would be to use an attached behavior. You could then turn this feature on for all or some of the TextBoxes.