wpf inherit from forms.usercontrol
-
Sunday, April 15, 2012 9:16 AMall the samples are shows how to inherit from system.windows.control.usercontrol but any one know a trick/method how to inherit from system.windows.forms.usercontrol??
the wpf page is locked and i get a messege "The document root element is not supported by the visual designer"
All Replies
-
Sunday, April 15, 2012 9:18 AMall the samples are shows how to inherit from system.windows.control.usercontrol but any one know a trick/method how to inherit from system.windows.forms.usercontrol??
the wpf page is locked and i get a messege "The document root element is not supported by the visual designer"- Merged by Sheldon _XiaoModerator Tuesday, May 01, 2012 7:56 AM
-
Monday, April 16, 2012 7:57 AMModerator
Hi zizi2,
If you inherit from a system.windows.forms.usercontrol, it is a windows forms control instead of WPF control, and Winforms control could not be used in WPF application directly, you have to use ElementHost element, refer to:
http://msdn.microsoft.com/en-us/library/ms751797.aspx
http://msdn.microsoft.com/en-us/library/ms751797.aspx#Windows_Presentation_Foundation_Application_Hosting (Hosting Windows Forms Controls in WPF)
Best regards,
Sheldon _Xiao[MSFT]
MSDN Community Support | Feedback to us
Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
- Marked As Answer by Sheldon _XiaoModerator Tuesday, May 01, 2012 7:58 AM
-
Monday, April 16, 2012 7:57 AMModerator
refer to your other post:
http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/f3f4802d-4a90-4c10-a597-7416f11650b6
on the other hand, you could start only one thread for one question, thank you.
Best regards,
Sheldon _Xiao[MSFT]
MSDN Community Support | Feedback to us
Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.

