Condividi tramite


WPF/E and ASP.NET

In a previous post I mentioned the ASP.NET wrapper control that I wrote for the WPF/E browser plug-in.  This control was created to show some of the ideas we have for integration with ASP.NET.

The server control abstracts the differences between the object and embed tag so that you can use the same .aspx page to target IE, Firfox, Safrai, or Opera.  The ASP.NET control exposes the WPF/E parameters as properties and has a smart tag to make configuration simpler.

Since the ASP.NET design surface does not instantiate ActiveX controls, the smart tag also exposes a simple XAML text editor that allows content to be entered and previewed.  The image below shows the project for the clock sample from my earlier post open in Visual Studio. 

The steps to create this sample:

  • Create a new ASP.NET web site
  • Set the background image of the body
  • Add an instance of the WPF/E wrapper control
  • Use the smart tag to set the XAML
  • Set the windowless mode and background color using the smart tag
  • Set the javascript method that will be called when the XAML content is loaded
  • Write the javascript to access the RotateTransform for each hand and set it's angle based on the time
  • Hit F5 to see he content in the browser

Assuming the XAML and loaded script function were created beforehand, it would take under a minute to build this demo. 

Another idea we have is to create an ASP.NET WPF/E video control.  This would offer a smart tag to set the .wmv the control will play.  The transport controls would be XAML so they could be styled, branded, rearranged or even removed using Expression Interactive Designer.  We even threw around the idea of a web service that would provided a list of canned styles for the transport controls. 

The thing to take from all this is that WPF/E is a web technology and any HTML editor can be used to integrate XAML content into your site and we plan to work closely with the ASP.NET team to make sure Visual Web Developer offers a seamless experience for adding WPF/E support to a page. 

Along those lines, if you've got ideas for how WPF/E could be used with ASP.NET leave a comment or contact me throgh the blog system.

Comments

  • Anonymous
    March 31, 2006
    I haven't posted anything this week due to being miserably sick since I returned from Mix06.  However,...