Silverlight 2: Download the source, unit tests and unit test framework
The download is now live for the Silverlight 2 controls source code package. The controls are included in the Silverlight 2 SDK, but if you’re a control developer, interested to learn more about how we implemented our controls, this will serve as a great reference. There’s also around 2,000 unit tests that target the core controls, extended controls, and even the DataGrid!
I’ll be posting a lot more great information about this in the coming weeks, but wanted to get the link out there!
The source code for the Silverlight 2 Beta 1 controls includes implementations for the following controls:
- Button
- ButtonBase
- Calendar
- CheckBox
- ContentControl
- DataGrid
- DatePicker
- GridSplitter
- HyperlinkButton
- ListBox
- RadioButton
- RangeBase
- RepeatButton
- ScrollViewer
- Slider
- ToogleButton
- ToolTip
- WatermarkedTextBox
Unit tests for the controls are located in respective ‘Test’ subdirectories, which use Microsoft.Silverlight.Testing.dll and related test framework binaries located in the ‘Bin’ directory.
For more information about Silverlight 2 Beta 1, see the Silverlight 2 SDK Beta 1. To get the Silverlight 2 Beta 1 browser plug-in, go to this page.
[...] announced during the MIX’08 keynote by Scott Guthrie, not only are we making available the source code of the Silverlight controls, but we’re also releasing nearly 2,000 unit tests and a unit test framework for the [...]
Can we then convert these to WPF? What came first the cart or the horse. Can I get WatermarkedTextBox and DataGrid and maybe some of the others in WPF? I understand these are beta but when they are not will they also be WPF version? Was SilverLight to be a subset of .Net? How can it be by having soemething with some that is not in the base .net?
“Some One”, I’ve heard similar feedback from several folks while at MIX, and in my opinion it’s definitely something that I’d love to see done.
We’re striving hard for compatibility with WPF as a subset, so if you’re looking at the basics – Button’s there, CheckBox is there – you’re looking at a subset. But yeah, DataGrid and some of the others are actually unique to Silverlight right now.
I haven’t tried it yet, but since we’ve released the sources, I wonder if it would be easy to get these to build on WPF?
Hi Jeff,
I don’t see these three files in the package:System.Windows.Controls.dll, System.Windows.Controls.Extended.dll, and System.Windows.Controls.Data.dll
Thanks,
John