| Author: Lalji 14 Oct 2009 | Member Level: Diamond | Rating:  Points: 2 |
use this code
using System.Windows.Controls; using System.Windows.Forms.Integration; using Fibonacci;
namespace WPFHost { /// <summary> /// Interaction logic for Page1.xaml /// </summary> public partial class Page1 : Page { private readonly MainForm mainForm = new MainForm();
public Page1() { InitializeComponent();
//Create a Windows Forms Host to host a form WindowsFormsHost windowsFormsHost = new WindowsFormsHost(); stackPanel.Width = mainForm.Width; stackPanel.Height = mainForm.Height; windowsFormsHost.Width = mainForm.Width; windowsFormsHost.Height = mainForm.Height; mainForm.TopLevel = false;
windowsFormsHost.Child = mainForm;
stackPanel.Children.Add(windowsFormsHost); } } }
more info ---------- http://www.codeproject.com/KB/WPF/Winform-To-WPF.aspx?display=PrintAll
|
| Author: seema 14 Oct 2009 | Member Level: Gold | Rating:  Points: 2 |
http://books.google.co.in/books?id=558i6t1dKEAC&pg=PA361&lpg=PA361&dq=How+to+host+an+wpf+browser+application&source=bl&ots=gZthHBIOMP&sig=kHEQn59xw_ycvUUJvVZEqWw1Zno&hl=en&ei=n7PVSqaEM6OQ6AOv-oyzAg&sa=X&oi=book_result&ct=result&resnum=10&ved=0CCoQ6AEwCQ#v=onepage&q=How%20to%20host%20an%20wpf%20browser%20application&f=false just go through this link
|