Published Friday, December 15, 2006 5:00 PM by mtaulty

WPF/E and "Layering" Content

This gets more interesting by the day (for me, anyway :-)).

I wondered what happened if I wanted to "overlay" WPF/E content on top of other content in the browser and the most interesting content I could think of was a map from Virtual Earth.

It took about 1 minute to work out how to get the default map in Virtual Earth (with most of the minute being spent navigating to the help page that says how to do it) and then I drew this little triangle thing in Expression Design that you can see on the screen below and then brought that Path object in to the WPF/E environment and positioned a windoless WPF/E Canvas right over the top of the Virtual Earth map control and set both of them to the same width and height (using the z-index to make sure that the WPF/E content is on top).

 

I set up event handlers in Javascript for the MouseEnter,MouseLeave, MouseLeftButtonUp, MouseLeftButtonDown, MouseMove events that fire from the Canvas object and the only handler that really does anything with the map is the MouseMove handler which just calls Pan on the map to move it around the screen.

So...when we're dragging this map around it's actually the WPF/E Canvas that catches the drag event and passes it on to the VE control underneath.

I could see some people (with graphical talent) doing some seriously cool things with Virtual Earth on the back of this.

Here's the link to the sample;

http://mtaulty.com/wpfe/ex9.html

There's a little animation on the funny looking Path object in the middle to make it grow and shrink a little just to show that our WPF/E content is "live".

# Proof of concept: Microsoft's WPF/E + Maps @ Saturday, December 16, 2006 3:11 PM

Remember WPF/E, that new Microsoft web interaction and display technology that surfaced as a preview a few days ago? It is supposed run on both Mac and Windows (XP and Vista), and in IE, Firefox and Safari — the clearest...

Ogle Earth

# The power's back on and there's a glut of new WPF/E blogs and samples @ Wednesday, December 20, 2006 10:41 AM

After almost 5 days without power (yeah, it was cold), Puget Sound Energy brought the power back to my

Mike Harsh's Blog

# 更多WPF/E相关信息/例子(2) @ Friday, December 29, 2006 1:19 PM

1。[来源: Barak's Blog about "WPF/E" and beyond ] WPF/E产品组的设计师提供了一张使用了WPF/E,可以设置内容的 贺卡 : 2。[来源: Mike Harsh's

Joycode@Ab110.com

# More WPFE, Virtual Earth, and html goodness! @ Tuesday, January 16, 2007 8:51 AM

I was inspired by WPF/E and "Layering" Content and Using Opacity with a WPFE / Virtual Earth Mashup to

Public Sector Developer Weblog

# WPF/Expired @ Wednesday, January 31, 2007 5:50 PM

Just got this when I went to view a WPF/E enabled webpage (trying to figure out layering stuff and was

Bryant Likes's Blog