Language/C#

WPF usercontrol을 winform에서 사용하기

Lohen 2016. 2. 4. 22:44

전제조건.

 

WPF userconrol이 있다.

 

 

사용하기.

1. 참조추가

- C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client\PresentationFramework.dll (찾아보기)

 

- C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client\PresentationCore.dll (찾아보기)

 

- WindowsFormsIntegration (.Net)

 

2. using 추가

using System.Windows.Controls;
using System.Windows.Forms.Integration;

 

 

3. winform에 ElementHost 추가

 

4. 추가된 ElementHost.Child에 WPF userControl 넣어서 사용하면 됨 ^^

 

반응형