[BlogMyCode] Using WPF within WinForms Project

Everyone, who tried to add WPF control to project, that WinForm application, noticed, that it never compiled and return errors about InitializeComponent within WPF control. In order to make it work, just unload you project (right mouse click -> Unload), then enter build edit mode (right moouse click-> Edit) and add following line after similar one with CSharp.targets (at the end). Reload the project. Hurah! Now you can use WPF controls within WinForm application.

<Import Project=$(MSBuildBinPath)\Microsoft.WinFX.targets />

⟨ ,  ⟩

No comments yet

Leave a Reply

Recommended

 


Sponsor


Partners

WPF Disciples
Dreamhost
Code Project
Switched to Better Place

Together