The steps below help us achieve that:
1) Add <WindowsFormsHost> control to the window
If needed remove the Height, Width and Margin property and use 'Stretch' for HorizontalAlignment and VerticalAlignment - to simulate the Dock=Fill.
2) Now we can add any WinForms control to the WindowsFormsHost.
For example if we have WinForms user control named UserControl1, we can write this code:
UserControl1 uc1 = new UserControl1();
winHost.Child = uc1;
- cheers
HTH
No comments:
Post a Comment
Note: only a member of this blog may post a comment.