VS2015, C# how to implement WPF within winform?

Richard Payne
Richard Payne used Ask the Experts™
on
Has anyone have procedure and/or demo code that shown WPF object (ir datagridview, button, checkbox) within WinForm.

I tried in past in VS2015 but could not get it working correctly.

I like to try again.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Senior .Net Consultant
Top Expert 2016
Commented:
Richard PayneChief Technology Engineer

Author

Commented:
Eric....Does it work on VS2015?
Éric MoreauSenior .Net Consultant
Top Expert 2016

Commented:
I just did a test using VS2015. I created a C# Windows Forms project, I have added a WPF User Control library project to the solution (with a button on a control and handling the Click event). Finally, I have dropped the WPF control on my Windows form and it works.

Are you trying to directly drag a WPF control on a Windows form? That cannot be done.
JavaScript Best Practices

Save hours in development time and avoid common mistakes by learning the best practices to use for JavaScript.

Richard PayneChief Technology Engineer

Author

Commented:
Ok, that maybe why, I try do experiment.
BTW, can you include the demo that you have done if possible. thx.
Éric MoreauSenior .Net Consultant
Top Expert 2016

Commented:
there is a downloadable with my article!
Richard PayneChief Technology Engineer

Author

Commented:
Sorry, ok.
Éric MoreauSenior .Net Consultant
Top Expert 2016

Commented:

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial