Quick Fix Notes:
If you got to this article because you are trying to get the “Silverlight 4 Beta Toolkit” controls from silverlight.codeplex.com to show up in Visual Studio 2010 Beta 2, try these steps.
KEEP READING FOR SOME
I have recently started digging deep into Silverlight 4. I have installed
- "Visual Studio Professional 2010 Beta 2"
- "Silverlight 4 Beta Tools For Visual Studio 2010"
- "Silverlight 4 Beta Toolkit – November 2009"
- "Microsoft Expression Blend for .NET 4 Preview"
After getting all of those installed, I noticed that I didn’t see the toolkit controls in the toolbox in Visual Studio 2010 Silverlight projects. The seem to show up in Blend, but not in Visual Studio. That sent me on a hunt for controls. What I learned through the process gave me a much better understanding of the where the controls live, and what controls come with which install.
My search began by simply using the "Choose Toolbox Items" dialog that appears when you right click in a Visual Studio Toolbox and select "Chose Items…" from the pop-up menu.
I switched to the “Silverlight Components” tab and looked down the “Directory” column. As I did I noticed that while there were 150+ controls (172 to be exact in my install), there were only six distinct directories that the controls assemblies came from. I am listing those directories below with MY estimation of what component or features the directories and their assemblies represent.
|C:\Program Files\Microsoft SDKs\Expression\Blend Preview for .NET 4\Prototyping\Libraries\Silverlight||Sketchflow Assemblies. Interesting though because the Blend 4 Preview doesn’t include Sketchflow|
|C:\Program Files\Microsoft SDKs\RIA Services\v1.0\Libraries\Silverlight||.NET RIA Services (I haven’t installed the WCF RIA Services preview yet).|
|C:\Program Files\Microsoft SDKs\Silverlight\v4.0\Libraries\Client||Silverlight SDK Assemblies|
|C:\Program Files\Microsoft SDKs\Silverlight\v4.0\Toolkit\Nov09\Bin||Silverlight Toolkit control assemblies|
|C:\Program Files\Microsoft SDKs\Silverlight\v4.0\Toolkit\Nov09\Themes||Silverlight Toolkit theme assemblies|
|C:\Program Files\Microsoft Silverlight\4.0.41108.0||Silverlight core assemblies|
Along with the list of assembly directories, I also compiled all of the assemblies, namespaces, whether the control appears on the “Common Silverlight Controls” Toolbox in Visual Studio 2010 as well as if it appears in the “All Silverlight Controls” toolbox in visual studio. The data made it into various incarnations, but I ended up getting it into an XML format (ControlDetails.xml) that I could play with. I even made a SQL 2008 Express Database (SLControlsDB) that I could use but ended up opting for the XML instead. LINQ to XML in Silverlight is a really easy way to work with data.
Since I was playing with Silverlight I went ahead and made a Silverlight application to visualize the data I had collected (Source Code):
I made the above project using Visual Studio 2010 Beta 2, but I targeted the Silverlight 3 runtime just so people didn’t have to upgrade to the Silverlight 4 Beta runtime to see it. I know it’s kind of confusing to use VS 2010 to build an Silverlight 3 app about Silverlight 4 Beta controls. I just thought it was the most compatible way to do it.
Anyhow, long story longer, I learned a lot about what controls come from where in the Silverlight environment. In the end, I was able to filter the “Choose Items Dialog” to only show controls from the “C:\Program Files\Microsoft SDKs\Silverlight\v4.0\Toolkit\Nov09\Bin” directory, and then select those controls to add to my toolbox. I made a new tab in the toolbox called “Silverlight Toolkit Controls” and added them there. Everything was copacetic then.
Feel free to use the data I supply above, play with my sample app, or download and play with the source of my sample app. It shows some interesting examples of using LINQ to XML to populate the PieChart series using aggregates.
|XML File Containing Control Details||netconnex.com/slcontrolsinfov3/ControlDetails.xml|
|Normalized SQL Database with Control Details||netconnex.com/slcontrolsinfov3/SLControlsDB.zip|
|Live Control Data Visualization App||netconnex.com/slcontrolsinfov3|
|Control Data Visualization App source||netconnex.com/slcontrolsinfov3/SLControlsInfoV3.zip|