开发者

WinForms in WPF via VS Designer?

开发者 https://www.devze.com 2023-01-20 15:23 出处:网络
Is it possible 开发者_运维问答to add an WinForms UserControl into a WPF UserControljust using VS 2010 Designer?Yes, you should use the WindowsFormsHost and then include the clr-namespace and add the c

Is it possible 开发者_运维问答to add an WinForms UserControl into a WPF UserControl just using VS 2010 Designer?


Yes, you should use the WindowsFormsHost and then include the clr-namespace and add the components :

http://msdn.microsoft.com/en-us/library/system.windows.forms.integration.windowsformshost(VS.90).aspx

You can also do it by code by adding

Panel p = new Panel();
WindowsFormsHost wf = new WindowsFormsHost();
wf.Child = p;
0

精彩评论

暂无评论...
验证码 换一张
取 消