A discussion. Only one Windows Forms control can be nested within the WindowsFormsHost. But we can use a control such as TableLayoutPanel that can have sub-controls.
Detail In the example, I added a Click event handler. When the user clicks on the Button, the Button_Click event handler runs.
And The Text attribute of the Button is changed to the word "Clicked." This is not a WPF Button, which uses Content.
A summary. Based on my experiment with WindowsFormsHost, it seems that avoiding this element is an ideal choice. Using it introduces a lot of extra complexity.
Dot Net Perls is a collection of tested code examples. Pages are continually updated to stay current, with code correctness a top priority.
Sam Allen is passionate about computer languages. In the past, his work has been recommended by Apple and Microsoft and he has studied computers at a selective university in the United States.
This page was last updated on Sep 28, 2022 (edit).