Resolving SDK namespace references in Silverlight 4.0


When using a DataGrid control for example; as in the following XAML snippet: 

xmlns:sdk=”http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk

 

        <sdk:DataGrid AutoGenerateColumns="True"
            Margin="12,55,119,12"
            x:Name="MyGrid" />

 

You will need to include a reference to System.Windows.Controls.Data and System.Windows.Controls.Data.Input in addition to the reference to System.Windows.Controls included by default in the Silverlight Application template in Visual Studio 2010.

You will not typically run into this kind of problem using the Designer window, but may if (like me) you tend to type your markup manually. Obvious shortcut path to resolving reference issues is to use the designer temporarily to insert the problem control and see what changes in your references and/or markup :-). 

Advertisements

About generation12

I am a SharePoint/.NET consultant in the twin cities.
This entry was posted in Silverlight 4.0. Bookmark the permalink.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s