One of the most exciting features that we slipped back into Windows Presentation Foundation (“Avalon”) with the PDC release is Loose XAML. Loose XAML was cut back in March of this year, and its loss was greatly lamented (well, I’m exaggerating a bit, but it was a popular request on the MSDN Feedback Center).
Loose XAML is basically the capability that allows you to open any XAML file on your hard disk (or a hyperlink on a web page) and “run” it within a browser without compilation. You can’t embed any code within the XAML document – it has to just be pure XAML itself – so it’s not suitable for building a large-scale application; however it’s certainly a nice little feature for trying out a little XAML code or for something like a small animation that you might embed into a web page. Anyway, we’ve relented our stubborn and incalcitrant ways (actually, we’ve spent the last six months building a secure partial trust sandbox for in-browser applications) and this capability is now back.
If you have the September CTP of the WinFX Runtime Components installed on your machine, you can see Loose XAML for yourself by downloading the target of this link to your desktop and double-clicking on it. If all goes well, you should see this blog entry replaced by a small Avalon sample that demonstrates using a VisualBrush to create a reflection visual effect. Running it directly by clicking on the link doesn’t work successfully right now – I’m presuming there’s something not quite right in the partial trust security sandbox in this release (perhaps I’m inadvertently using something that’s not supported in partial trust), so make sure you save it to disk first. Cool, isn’t it?