Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
655
Docked Tab's switching
posted

One issue we are facing is docked tabs switching automatically based on what is happening within them.

For example if we have three tabs docked together on the right side, we explicitly at times set focus to one of them (based on a user action), but this often triggers async activity in other tabs within that same tab group. So if 10 seconds after we switch to a particular tab and another tabs async process finishes and loads data into a WPF DataGrid within that tab + sets the index, or perhaps updates a tab control index, the docked tab switches focus. This is not the desired result.

 (In our Shell where the DockManager lives we have a PRISM event that triggers "Activate()" on a tab of our choice and thats how we switch focus - maintaining it is the problem)

Have you seen this before and do you have any generic advice on how to resolve it?

One technique we are using is to use "loaded / unloaded" to control when we allow controls within the tab to actually do things like set the selected Index but its a painful way to resolving this.

As always thanks for your help.

  • 54937
    Offline posted

    Setting the selected index of something within a contentpane shouldn't cause this. It sounds more like something within the pane is either focusing itself, requesting to be brought into view or you have code that is activating that tab. Maybe you have a situation like what is described here and may be able to handle this by handling the RequestBringIntoView event.