The idea of using Windows form in WPF is to use a control with the navigate function as a container to "navigate" the Windows form control. In WPF, there are three controls with the navigation function: navigationservice, navigationwindow, and frame.
Use in WPF. the article net2.0 control briefly describes how the WPF control library control can accommodate windows Form Controls and how to reverse accommodate them, examples are provided to illustrate how to use the windowfromshost control in XAML as the container navigatewindows form control. Here we will further describe how to use any WPF control as a container to accommodate windows form: Use windowfromshost to wrap the window form control, and then use the container navigation windowfromshost.
The idea of extreme programming is "code is better than all documents". So here I will post a little code to illustrate how to accommodate windows Form Controls in the WPF container:
Windowsformshost host;
Host. Child = new xxxxxxxxxxxxxxxxxwindowformcontrol;
Yyyyywpfcontainor. navigate (host );
(End)