Shawn Burke's Blog

Pushing the new stuff

Toolkit Extender for creating WPF/E components

Toolkit Extender for creating WPF/E components

  • Comments 19

If you haven't already seen ScottGu's post on WPF/E, I'd recommend checking it out.  WPF/E is a new technology that opens up incredible new possibilities for improving the richness and interactivity of the web.  Scott links to a few demos, and the WPF/E install is quick simple, and even works on a Mac!

Adding a WPF/E component to your page is still a little bit of work though.  To make it easier, I've created a simple Toolkit extender that automates this code so you can just create the extender and go.  See the attached file below - there is a C# and a VB.Net version of the component (though if you're just using the extender, it doesn't matter).

To add WPF/E to your website:

    1. Create your XAML file (there is a simple XAML file in the sample attached, otherwise you can use the Expression Interactive Designer beta).  Add the file to your website.  Also add any other scriptiing you'd like for your WPF/E component.
    2. Build the attached solution and add the WPFEHost DLL to your website's bin directory (you'll also need to add AjaxControlToolkit.dll if you don't already have it).
    3. In your website, create a Panel where you want the WPF/E content to show.  
    4. Add the WPFEHost extender.  Note that if you're writing any script against your WPF/E control, the ID of the WPF/E control will be set to the ID of Extender, for example "wpfeControl" below.

<wpfe:WPFEHostExtender ID="wpfeControl" Runat="server" Height="350px" TargetControlID="Panel1" Width="350px" XamlPath="myWpfeControl.xaml" BackgroundColor="transparent"/>

That's it! 

 

Attachment: WPFEHostExtender.zip
Leave a Comment
  • Please add 2 and 4 and type the answer here:
  • Post
  • 对网上的WPF/E文章汇总,前一部分来自思归的WPF/E技术文章,每天整理一些资源.

    1。WPF/E起步--GettingStartedwith

  • 新的技术层出不穷啊,微软的任何一个动作都有可能引起程序界的轰动或者骚动。追着微软真累:(

  • 摘要

    昨天诸事不顺,早晨起来肠胃开始不舒服。下午坚持写好本篇推荐文章之后,还没发布居然鬼使神差一般就把草稿删除了?!WindowsLiveWriter处理数据安全方面确实有一套,删除的草稿无论用...

Page 2 of 2 (19 items) 12