[Post written as of Silverlight 2 beta 1 and Expression Blend 2.5 march preview]
Strange that the DataGrid is not in Expression Blend 2.5 march preview toolbox, but only in VS2008 !?
If you add a DataGrid in VS2008 and then switch to Blend that will break your designer.
It seems like there are problems with these assemblies references in Blend 2.5:
Remember that controls are not part of the runtime, they are part of the SDK and must be distributed with each application. Here are the different folders:
- Runtime: "C:\Program Files\Microsoft Silverlight\2.0.30226.2"
- SDK: "C:\Program Files\Microsoft SDKs\Silverlight\v2.0\Libraries\Client"
1. Fix the reference in Blend:
Add reference to "System.Windows.Controls.Data.dll" from the SDK folder.
2. Add this markup in <UserControl declaration:
3. then, you can add a DataGrid like that:
Now you can find the DataGrid in Blend 2.5 Toolbox :
- Click on "Asset Library" (bottom of toolbox)
- Check "Show All"