I’m attempting to place a Winforms panel within my WPF UserControl, with the following code;
<WindowsFormsHost Grid.Row="3">
<WinForms:Panel>
<WinForms:TableLayoutPanel x:Name="myLayoutPanel" />
</WinForms:Panel>
</WindowsFormsHost>
Error:
The type ‘Panel’ does not support direct content.
I’m will then then initialise the TableLayoutPanel panel within C# code. Any ideas how I can workaround this error?
the Windows.Forms Panel Container is called Controls. You should be able to add it by doing something like this: If it were me I would just create a Winforms UserControl and add that to the WinFormsHost instead.