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
1590
InvalidOperationException with WindowsFormsHost in ContentPane
posted

Hi, I'm trying to place a WindowsFormsHost in a ContentPane, but I'm experiencing problems when trying to resize the SplitPane that contains it all. Please take a look at my sample. If you run the sample, the panes are all empty and you will notice that the panes can be resized without any problems. Now, if you uncomment the WindowsFormsHost in the XAML and run the sample again, the application will crash when you try to resize a splitpane. The exception is an InvalidOperationException saying "Specified element is already the logical child of another element. Disconnect it first.". What am I doing wrong?

Regards, Stefan

TestWindowsFormsHost.zip