Cover

More WPF/E...

December 19, 2006
No Comments.

Url: http://wildermuth.com/wpfesamples

I have been polishing up my use of WPF/E on my website to have a better way to host my samples.  I now have a landing page for my WPF/E samples:

http://wildermuth.com/wpfesamples

This landing page is actually a really simple WPF/E page I created for a class I taught in Redmond earlier this month so its not much to look at.  In creating this page I wanted to host WPF/E inside a master-page driven form and I wanted an excuse to try out the new ASP.NET WPF/E Control that Mike Harsh was advocating.

Mostly I like the new control as it makes some of the bit-fiddling necessary to host your XAML pretty clean.  I really like the ability to use the Channel9 hosted aghost.js file.  I’ve changed all my examples to use that aghost file for clarity.  If you want to manually link to that version of the hosting script, it is located at:

http://channel9.msdn.com/playground/wpfe/pageturn/js/aghost.js

My only pet peeve with the control is that I had to hack together the name of the host element when I used it in my JScript file. Because the name that I specified for the host was in a masterpage-driven web form, it changed the name to be unique so “theHost” became “ctl00_ContentPlaceHolder1_theHost”.  No biggie, but I think we need a better way to do this since we don’t want to force the JScript to be created by server-side scripts that can be driven by the server information.  My guess is that no one has used this embedded in other containers before so its a bug that needs to be worked out.

Overall, it did simplify the entire process.  Check out both my sample page and Mike Harsh’s blog about the new control if you’re playing with any of the new WPF/E stuff.