I have a textbox which has UpdateSourceTrigger = LostFocus.
When I type something in textbox and immediately click on button, the button click event does not fire. I think textbox simply loses the focus to button. When i click on button again it fires click event.
How to overcome this issue?
Here is my XAML code:
<TextBox x:Name="ApText"
Width="135"
Margin="0,4,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Text="{Binding Value, Mode=TwoWay, NotifyOnValidationError=True, UpdateSourceTrigger=LostFocus, ValidatesOnDataErrors=True, ValidatesOnExceptions=True}"
TextWrapping="Wrap"
Validation.ErrorTemplate="{DynamicResource UI.ErrorTemplateStyle}" />
<Button
Width="100"
MinWidth="60"
MinHeight="40"
Margin="0,8,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Bottom"
Command="{Binding SaveCommand}"
Content="Save" />