C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » WPF »

How to host an wpf browser application?


Posted Date: 14 Oct 2009      Posted By: Kumar, K, M      Member Level: Silver     Points: 1   Responses: 2



HI,
can anyone tell me how to host an WPF Browser application?

thanks,
kumar.





Responses

Author: Lalji    14 Oct 2009Member Level: DiamondRating: 2 out of 52 out of 5     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 2009Member Level: GoldRating: 2 out of 52 out of 5     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



Post Reply
You must Sign In to post a response.
Next : Should i use only c# for event handling in wpf?
Previous : Graphical library in wpf
Return to Discussion Forum
Post New Message
Category: WPF

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use