integrate WPF with ASP.NET
Is it possible开发者_开发问答 i can use WPF in ASP.NET application. if so, how can i create an ASP.NET web site with WPF. Thisng is, i have created a website through visual studio. Then i was trying to add a web page as WPF. But i couldnt. I am very new to WPF. Please help me. Is it WPF is only for winform application? We could not add WPF in web forms? Regards
WPF (Windows Presentation Framework) is primarily a desktop technology. It is possible to embed a WPF application inside a web page as a XBAP (XAML Based APlication) but that is different than creating pages with WPF.
Silverlight is the framework to chose if you want to build a Rich Internet Application. Is has better integration with the pages that it is embedded on as well as any Javascript on that page.
Both WPF and Silverlight use XAML and a common set of controls so Silverlight should be somewhat familiar.
WPF can be placed inside an ASP.NET page (or any other web technology) with the browser's WPF Plugin (or ActiveX for Internet Explorer), called XBAP.
But WPF is a large set of components and need the .NET Framework installed on the user machine to work. In other words, the plugin just place the WPF content on that position and calls the .NET Framework to load there.
The closest approach is to use Silverlight, wich is a small subset of WPF components, fully based on browser's plugin (like Flash does). It has less "things" than the full WPF API, but is very good for most uses.
Resuming, Silverlight needs the plugin installed on the users' browser (like Flash needs). And WPF needs both the plugin and also the .NET Framework installed on the users' machine.
Worth mentioning that silverlight RIA will run in IE and firefox (safari etc) on a Windows box and in linux with Moonlight if its compiled to Silverlight 2.0 or earlier (but not yet if its compiled to Silverlight 3 or later).
WPF XBAPS will only run in IE on Windows box.
精彩评论