标签: wpf winforms visual-studio-2010
是否可以将 WinForms UserControl 添加到 WPF < em> UserControl 只使用VS 2010 Designer ?
答案 0 :(得分:0)
是的,您应该使用WindowsFormsHost,然后包含clr-namespace并添加组件:
http://msdn.microsoft.com/en-us/library/system.windows.forms.integration.windowsformshost(VS.90).aspx
您也可以通过添加
Panel p = new Panel(); WindowsFormsHost wf = new WindowsFormsHost(); wf.Child = p;