Hello, I have a Textbox and a Toolbar with a button. If I'm typing in the textbox and I Click the button I want the TextBox to lose focus so the binding gets updated. I don't want to add a UpdateSourceTrigger=PropertyChanged to my TextBox. But instead when I click on the button I reset focus to the main window so what ever I'm on loses focus and updates the bindings.
I've tried adding a OnClick to the button with the following, but it doesn't seem to work.
private void Button_Click(object sender, RoutedEventArgs e) {
FocusManager.SetFocusedElement(this, null);
}
Any tips would be appreciated.
Thanks, Raul