Why would clicking in another TextBox
not raise the LostFocus
event of the current (bound) TextBox
and thereby commit changes to the data source? My UpdateSourceTrigger
is not set, so I assume that by default WPF would commit changes on LostFocus
.
My changes get committed correctly when I do the same thing using TAB key instead of mouse click.
EDIT
I just found out that clicking on TextBox
es that appear in the same parent container DOES raise LostFocus
and commits changes, but when I click a TextBox
that lives in the main ToolBar
of my screen, then it seems to show this problemetic behavior.
EDIT 2
Although I have marked BastiOnWpf's post as the correct answer below, I found an equally good or better solution to fix this problem. The solution is to simply set
FocusManager.IsFocusScope="False"
on your ToolBar
in XAML.