We’ve just published the sample source code for the Silverlight 2 Controls as shipped in the runtime and the SDK.
Within the RuntimeControls folder, you’ll see a Solution that contains three projects:
1. SilverlightControls – One can edit the source and default control templates of the controls in order to build a DLL containing custom versions of the controls.
2. Controls Sample – One can take the SilverlightControls DLL from #1 and include it in a project such as this. If you press F5, this app will launch displaying the controls created in #1.
3. System.Windows.Design – This project is here largely for reference, it shows how to build a Design dll for VisualStudio and Expression Blend such that your custom controls would display within the toolbox.
Disclaimer: Note that we did take a small amount of changes in the Runtime Controls to get the project to properly build outside of our internal build environment.
The source for the following controls was released:
- Managed Runtime Controls:
- SDK classes:
- Unite Tests for the SDK controls
- Appropriate sub-types (eventargs/ handlers, etc)
Have fun and let us know what you build!
Seema, Andre Michaud, & Jon Sheller
En la noticia no se dice, sin embargo, bajo qué licencia se publica, y en la descarga (enlazada en la noticia) se propone como "Sample Source Code" (cófigo fuente de ejemplo).
It's a new year here at Microsoft and we've published the source code for the Silverlight runtime and
Ste uporabnik tehnologije Microsoft Silverlight ? Gradite bogate spletne aplikacije in ste ljubitelj
Silverlight 2控件的源代码现在已经可以供公众下载 。 这个是Seema发布的消息: http://blogs.msdn.com/seema/archive/2009/01/07/published-the-control-source-code-for-silverlight-2-runtime-sdk.aspx
Microsoft just released the source code for the Silverlight 2 runtime and SDK controls.  Anyone
微软发布了Silverlight 2 控件SDK 源代码，里面包含三个项目： 这是学习如何制作Silverlight控件的最佳实践，更详细信息参看这里：Published the Source c
I was watching an interview with you, and you were ask "what will you do after silverlight 2 has released, and your answer was, I dont know yet". Does that mean you will not continue working on optimizing the graphics rendering of sliverlight? I think silverlight rendering needs much work. I would love to code some expression blend effects in silverlight and also have more controle of antialiasing especially with text.
Cudos to Microsoft for moving towards open code concept! As a Microsoft.Net developer, it gives me the ability to find out what is happening behind the scenes exactly and to isolate problems with pinpoint accuracy.
I've been using this approach for a few months already, and I am a hapy camper! What I discovered, though, is that I cannot reuse existing code(which, in many cases, is just beautiful, by the way) or to extend functionality of the existing controls because of enormous use of internal code members and sealed classes. Having the source code available simplifies many things (by simply re-compiling after changing the internal modifier to public). I am pretty sure I am not the only one having the same issue.
I hope, the direction towards open source will shed a light on protecting of internal members from re-use. It is not that proprietary anymore!
I agree with Ruslan.
internal and/or private properties/members and sealed classes have caused me (and I reckon, most developers), a lot of pain.
A simple example is following, where I could have simply overridden CoerceValue(), but ended up copying and modifying 3 files (Just to get the Slider SmallChange to work as it should).
But without the published source code, it would have been messy (with just Reflector to get to the controls code, as far as possible).
They aren't contributing to the world of code. The code Microsoft releases are unusable due to licensing restrictions. If you use it you can get sued.
Microft source code is the equivalent of a stipper giving you a lapdance: You can look, you can get all excited, but in the end, if you touch it you'll be in trouble.