简体   繁体   中英

How to apply Windows Forms Control to WPF Custom Control Library?

I'm trying to encapsulate Windows Forms Control (from previous version of project) to WPF Custom Control Library. Because I want to use it in future Wpf applications (like drag&drop from toolbox in VS). I successfully done this: WinForms in Wpf App . Do you know site/or tutorials where this things are explained?

What I got: .dll with WinForms control, Wpf Custom Control Library project (to place WinForms control) and Wpf Aplication.

Thanks for your help and suggestions.

What SonerGönül is refering to, is that if you read the links he points out. You can see you should have done this steps better:

  • Do your homework

    There is plenty of examples all over on how to achieve what you want to do. Search on Google something like "how to host winforms in wpf" You will get plenty of links like: http://msdn.microsoft.com/en-us/library/ms751761.aspx Even questions done in this site in the past.

  • Be specific, Make it relevant to others

    You need to make a more clear question. Read your question as if someone else is the person who wrote it, and think if you would be able to understand it properly.

People in this site wants to see you have worked towards solving your problem, therefore you can mention things you already have done, and make a specific question. Like "I implemented what this website suggest but I am getting this exception"

To answer your question

I really like this website: Mixing WPF and WinForms

Because it gives you a nice both side explanation of how Mixing WPF and Winforms works, with examples.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM