
After a fairly hectic week I finally had a chance to sit down and have a play with the new Silverlight 2 beta 1 release. I have been waiting a long time for this release as it finally provides Silverlight with some of the key features that have made WPF such a compelling framework to work with.
In order to get to grips with these features, I decided that I would write a simple control template browser that users can access over the web. Control Templates are the default look and feel that are implemented by Silverlight controls. The template browser allows you to choose a control from the side menu and will display the control template in the right had pane. Building this kind of tool is useful for a number of reasons, firstly I hadn’t seen a zero-install implementation and secondly it provides just enough scope for me to assess the new features available. Below is a summary of the areas I have tested as part of this tool.
- The new control libraries.
- New flow layout containers such as Grid, StackPanel and Borders.
- Overriding of control templates
- Defining styles in the resources section
- Databinding of styles
- Data templates & business object bindings
- .NET Framework support
In writing the control template browser I found that the designer support in visual studio worked well. I would randomly get some error about not being able to attach to the browser process but this was fixed with a quick restart of VS2008.
The controls available as part of Silverlight 2 have the majority of the most commonly used properties, now and then however you will find holes in this which may make you scratch your head. Generally though I think the team have done a good job. Just one note on controls... there is no ComboBox...Why? Also I couldn’t get the textbox scrollbars to display.
I did find a rather frustrating issue with the fact that I could not use the MergeDictionary class in my XAML to import styles from other resource files. The result is that I had to declare all my styles in the resources at the top of my page.
Other than these few niggles which have work arounds, I reckon future of Silverlight look bright. I intend to test the network support in Silverlight in a future blog. But I have snowboarding to do before then!
Links
Source Code
View Silverlight Control Template Browser
Known Issue: Template not loading for TextBox Control