A XAML Moment
Wednesday, July 22nd, 2009I’ve started digging into Silverlight the last few weeks,and a few days ago I had a light bulb moment.
I’ve realized the awesome power of XAML,here’s how you can see for yourself. Make sure you have MS Visio installed, download and install Visio Export to XAML add-in (read more here). Next, drag any shape(I used the Mainframe shape) onto the design surface. Make sure the shape is selected and click on File> Export to XAML and click on the Export to XAML button.
Open the generated file in any xaml viewer and tada! The image is now completely programmable. Check a very silly example here. Click the button and you’ll notice that the lights on the mainframe starts flashing.
The ability to program the image is because of Visio’s Scalable Vector Graphics(SVG) format. The add-in converts the SVG into usable XAML. So in theory, you would be able to convert any SVG file into XAML and have your programmatic way with it.
Pretty cool, isn’t it?