I have a WPF Window that has a TabControl in it. Inside each tab is a user control, one of which has another TabControl in it. Inside this tabbed user control, the user can interact with various data items that are two way bound to some Linq entities. There's
a button on the control that calls "SubmitChanges" on the Linq DataContext, but I decided to implement a check to make sure data is either committed or discarded when this user control's visibility becomes hidden. This check displays a MessageBox asking the
user to confirm if they wish to discard the updates (inserts and deletes automatically force a SubmitChanges, only Updates would be uncommitted at this point).
If the user clicks "No", I call Focus on the user control to allow them to click the update button, but if they click "Yes" and want to discard their changes, I want the tab they clicked on that prompted the change in visibility to now display itself, but
instead, the user control with the nested tabs is still displayed in the content area, even though the outer tab control shows a different tab selected. It refreshes and displays properly if the user clicks onto a different tab and clicks back, but I think
the fact that I'm displaying a MessageBox may be interfering with the tab switching. I've tried getting the SelectedItem from the outer TabControl, casting it as
View Complete Post