开发者

WinForms in WPF via VS Designer?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜