My notes from the First Look at Silverlight 2
Today, Scott Guthrie posted a First Look at Silverlight 2 as an hearty appetizer before the first public beta of Silverlight 2. (Notice the “2” and not “2.0” anymore.)
Along with his overview he built a simple Digg client and 8 tutorials on how this is done using the new features in Silverlight 2. I’ve read through each Tutorial and I thought I’d share my notes and comments:
- New Project Templates – Very simple to create a new Silverlight application and accompanying test web application. You can also see that there is the option to Add the application to an existing Web Application as well, which is a more likely production scenario.
- Application package (.xap) – One compressed file to reference that instantiates your application by way of the object tag. Beauty! This will make it much easier to embed Silverlight applications.
- VS Support – XAML intellisense, code intellisense and shortcuts for event handler creation.
- Stack Panel – arranges controls horizontally or vertically based on control size and margin
- Grid – very powerful multi-row, multi-column layout in some ways similar to an HTML table. I really like that it uses attached properties for placement rather than an embedded structure.
- Controls -Border control is nice, and he also mentioned the WatermarkedTextBox. Not only is there a TextBox now (yay!) but there’s a watermarked sub class.
- Resize the Application – Smart vector-based UIs are a beautiful thing.
- More than before -“call remote REST, SOAP/WS*, RSS, JSON, and XML HTTP”, that just speaks for itself.
- Cross Domain Access – respecting the cross-domain policy file, another huge deal
- LINQ to XML – I just recently started using LINQ and its just plain fun, even if you’re not a total data geek.
- Style – If you’re used to CSS or WPF Styles, the ship has arrived. Its time to leverage your skills and make that UI you’ve always wanted. Or just happily minimize the size of your XAML files by reducing repeated code.
This is one of my personal favorite new features and I’m looking forward to talking about it more.
- Listbox – another thankful addition to the Controls now available
- Databinding – another feature like LINQ that I have just started using more, like ASP.NET databinding but a little different. Definitely take a look at the DataTemplate.
- Using DataContext – …leads to Binding availability, definitely worth looking at Scott’s sample to know why this is exciting.
- Content property -more goodness from WPF, the Button has a Content property not just Text, because you can redefine the Content as needed. Need a button with an Image icon, just redefine the Content instead of building a new button. +1 for composition.
- Control Template – even more powerful than styling, you can completely reskin the control by redefining its template. Go from the standard rounded rectangle to an animated themed button and maintain all the interactivity and events.
- Copy and Paste – Copy and paste the code into a WPF application and after two small changes you now have a desktop application. Nice.