Avalonia synchronises view and view-model on every key press when using Text Box. This is sometimes quite useful! But I have an application where I'd like the "update" to happen only when I press the enter button or when I loose focus.
Is this possible in Avalonia?
At the time of writing, this is an upcoming feature you can only achieve in v.11.1 Preview. You will set the UpdateSourceTrigger
on the binding to LostFocus
.
<TextBox Text="{Binding MyText, UpdateSourceTrigger=LostFocus}" />