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
1130
Pane not activating?
posted

 Hi,

I have a XamDockManager, with some Tabbed Documents.  Each ContentPane contains a UserControl.  The problem I'm having is this; when one of my UserControls is the Active pane, and I try to open another ContentPane and call Activate, the new pane very briefly shows, but then the previous pane is reactivated.  

 What would cause a Tab to Activate on it's own?  I'm only calling Activate in one place where I add a new ContentPane tabbed document.

 Thanks

Andy

Parents
No Data
Reply
  • 54937
    Offline posted

    Activation is based around the input/keyboard focus of the wpf elements. The behavior you are describing sounds like focus is not shifting into the pane. I have seen two different scenarios that may lead to this. One is if the thing to receive focus was an HwndHost (including a Frame navigated to a web page, webbrowser, windowsformshost, addinhost, etc.). When an HwndHost receives focus it has to shift focus into its hwnd in which case there is no focusedelement (since focus is no longer within the wpf hwnd). This issue was reported recently and is addressed by the next hotfix. The other case is if the last element with focus within the pane was collapsed/hidden. In this case when the pane is activated it tries to focus the last focused element which in the case of a hidden/collapsed element ends up being a no-op so focus remained where it was. This too was reported recently and should be addressed in the next hotfix. In the interim, the second issue could be handled by explicitly focusing an element within the pane that is visible or possibly even the contentpane itself. In any case, you may want to submit the issue to the support group so you can be notified when the fix is available and to ensure that the scenario you are hitting is actually addressed by the fix.

Children