WPF Programmatically changing tab sort of work, but I have to click the tab again to able to click away
I have a BackstageViewControl menu creating tabs that load a new view for each tab selected. One of the views has a form that, in the event they click another tab, I want to prompt the user letting them know they have unsaved changes, would you still like to leave. If they click yes, then it navigates to the next page like normal, if no it stays on the current view. I’ve managed to get most of this concept to work, however, I have this strange problem where once you click cancel, I programmatically set the tab to remain the current one to prevent the navigation. Once I do that, clicks of the other tabs don’t even register. I have to click the current tab, then it will allow me to navigate away like normal. It’s as if the view I want is displaying, but the tab of the other is selected, but I have no idea how to get them to match.