Share via


Published the Source code for Silverlight 2 Runtime & SDK Controls

Hi all,

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.

Control Source Explorer

 

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:

o ButtonBase

o Button

o HyperlinkButton

o CheckBox

o RadioButton

o ToggleButton

o RangeBase

o ProgressBar

o Slider

o ScrollBar

o Thumb

- SDK classes:

o Calendar

o DatePicker

o DataGrid

o TabControl

o GridSplitter

- 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

Comments

  • Anonymous
    January 07, 2009
    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).

  • Anonymous
    January 08, 2009
    It's a new year here at Microsoft and we've published the source code for the Silverlight runtime and

  • Anonymous
    January 08, 2009
    Ste uporabnik tehnologije Microsoft Silverlight ? Gradite bogate spletne aplikacije in ste ljubitelj

  • Anonymous
    January 08, 2009
    Ste uporabnik tehnologije Microsoft Silverlight ? Gradite bogate spletne aplikacije in ste ljubitelj

  • Anonymous
    January 08, 2009
    Silverlight 2控件的源代码现在已经可以供公众下载 。 这个是Seema发布的消息: http://blogs.msdn.com/seema/archive/2009/01/07/published-the-control-source-code-for-silverlight-2-runtime-sdk.aspx

  • Anonymous
    January 12, 2009
    Microsoft just released the source code for the Silverlight 2 runtime and SDK controls.  Anyone

  • Anonymous
    January 13, 2009
    微软发布了Silverlight 2 控件SDK 源代码,里面包含三个项目: 这是学习如何制作Silverlight控件的最佳实践,更详细信息参看这里:Published the Source c

  • Anonymous
    January 14, 2009
    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.

  • Anonymous
    April 09, 2009
    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!

  • Anonymous
    June 18, 2009
    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). http://asheeshsoni.blogspot.com/2009/06/silverlight-slider-jump-value-by.html But without the published source code, it would have been messy (with just Reflector to get to the controls code, as far as possible).

  • Anonymous
    October 03, 2010
    The comment has been removed