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
2320
Maximising XamTabControl over WinForms airspace issue
posted

I have a XamTabControl with AllowMinimize = True set on top of another 'Document' control in a Grid, such that I can imitate the flyout panes of XamDockManager over a DocumentContentHost in a simpler fashion.

On double click of any one of the TabItemEx's, the XamTabControl content is minimized or displayed and gives the effect of popping out on top of the main 'Document' control. However, if the main Document control is WinForms embedded in WindowsFormsHost, the XamTabControl content appears behind the WinForms control.

I know this is to do with interop/airspace issues between WinForms and WPF, but I also know that the XamDockManager had the same problem in earlier releases and this was somehow fixed. (I might also add that the XamTabControl has the same focus issues as the XamDockManager as mentioned in this post but I was able to work around this for the XamTabControl by setting focus to the TabItemEx when clicked.)

Interestingly enough, if I handle the minimizing of the TabControl myself in code behind, say on the TabItemEx_MouseLeftButtonDown event, it appears over the top of the WinForms control as expected. Doing it this way (on single click rather than double click) is my preferred method of having the TabControl minimized and maximised so this isn't really an issue for me but it might be for someone else which is why I'm writing this post.

 

And for those wondering, the reason I'm not using the XamDockManager is because it was too slow rendering all my unpinned panes at startup.