Question

In a WPF/MVVM application I have a custom control on a particular view. This control extends WPF DataGrid and contains User names and ids.
On the same view I have some textboxes whose Text properties are bound to all different properties of User object exposed by the viewmodel and UpdateSourceTrigger for the Text properties are set to LostFocus.
Data gets updated as they should be whenever I leave a textbox (since the textbox looses focus). But problem is, this doesn't occur when I select any item in the custom control leaving any textbox, textbox data doesn't update. Can anyone explain what's happening?

Was it helpful?

Solution

Perhaps your custom control has its own focus scope defined, thus allowing logical focus to be in both the text box and your custom control? Try checking in snoop.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top