When you navigate in IE to a XAML file, it is running in a "sandbox".
Inside that sandbox (of lower privileges for the code), Window isn’t allowed. (We want to avoid pop-ups).
So if you replace the 4 instances of “Window” with “Page”, it should work fine.
Thanks, Rob Relyea
Program Manager, WPF Team
http://rrelyea.spaces.live.com