开发者

Embed a Windows Form in a web browser

I have a class which inherits System.Windows.Forms.Form. I need to make the form available via a Web browser. T开发者_高级运维he form currently allows a graph to be generated given various parameters. So embedding it directly in a web page would be ideal for my needs.

How would I go about doing this?

Thanks.


What you are after is XBAP, this allows you to do exactly what you want - embed a Windows Forms application within a browser.

What you do is reference your WinForms application (once compiled as a class library) from a WPF Browser Application.

The WPF Browser Application (a .xbap) can then be embeded in the html, for example as shown below :

<html> 
  <head>A page with frames.</head>
    <frameset cols="50%,50%"> 
      <frame src="introduction.htm" > 
      <frame src="XbapEx.xbap" > 
  </frameset> 
</html>

See http://www.xbap.org/ or MSDN for more information - there are also several good tutorials available on the webs.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜