A bit of context
<TextBox Text="{Binding Value, UpdateSourceTrigger=LostFocus}"/>
TextBox controls have a binding option called UpdateSourceTrigger, which is by default set to LostFocus. Howoever, this only works when the TextBox loses focus within its own Window. I require the binding to be updated even if the whole owner Window loses its focus.
Possible solution?
Now, the Window.Deactivated event seems to do this well.
<Window x:Class="MyWindow" Deactivated="OnDeactivated">
On to the question
That being said, how can the TextBox listen on its parent Window's Window.Deactivated event, considering that the TextBox lives under several layers of UserControl objects.
Window --> UserControl --> UserControl --> TextBox
How can I make the event bubble down from the Window to the TextBox? (ie: have the TextBox listen on the Window.Deactivated event)
Or maybe there's a better solution out there?