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
The untested hotfix I was able to obtain seems to resolve my issue.
The issue is addressed internally and will be part of the 9.1 release as well as addressed in the next hotfix for 8.1 & 8.2. With regards to a workaround, you may be able to just set FocusManager.IsFocusScope to false on the ContentPanes although I don't have the project to reproduce it available to ensure that will workaround it. You could also try to catch when the FocusedElement of the ContentPane is changed and hook the element's IsVisibleChanged and if it goes to false then change the active pane or possibly just clear the FocusedElement when the pane is no longer the active pane.
I don't know if this helps or not, but I was able to submit a project to demonstrate the problem, and they are working on a hotfix. It's been in the "Awating Testing" phase for quite some time now though.
I'm attempting to work around the second case that you've mentioned by checking to see if the element with logical focus in the newly active pane is visible. If not, I'll set logical focus to the ContentPane. I'm using the XamDockManager.ActivePaneChanged event to get the newly active pane. However, the NewValue property on the EventArgs is null when the element with logical focus is not visible.
I can set Focusable to 'false' on the element that becomes hidden, but this has some undeirable side effects. Do you know of any other way to work around this issue (until 9.1 is released)?
I was able to par down my application enough to get a running sample. I'm currently awaiting permission, because the sample would include some of our assemblies. Every assembly provided though I do have the source code to as well, but I'm not sure if they would be relevent to the issue, which the possible exception of my wpf assembly.