Can the controls in the toolbox be used in both Winform and WPF application?
If not, how can I know which controls are used in winforms, which con开发者_运维知识库trols are used in WPF?
If you develop a WinForms application, WPF controls are not shown in your toolbox, and vice versa.
If you want to use a WinForms control in a WPF application anyway, there's the WindowsFormsHost
WPF control for that.
For hosting a WPF control in a Windows Forms app, you can use the System.Windows.Forms.Integration.ElementHost
control.
The toolboxes already filter what controls you can use depending on whether you have created a Win Form or a WPF application project.
精彩评论