views:

178

answers:

1

I am trying to modify a Datagrid in Expression Blend 3 using Silverlight 3 tools. When I attepmt to open the file Blend shows the "Invalid XAML" error and in the XAML shows errors on certain properties within the DataGrids declaration.

 <my:DataGrid x:Name="dataGridLegals" AutoGenerateColumns="False" 
                         GridLinesVisibility="None" ColumnHeaderStyle="{StaticResource dthFull}" RowStyle="{StaticResource NoHoverStyle}"
                         AlternatingRowBackground="Transparent"  IsReadOnly="True"
                         Background="Transparent" BorderBrush="{x:Null}"  
                         RowBackground="{x:Null}" CanUserReorderColumns="False">

The following properties display errors:

  1. The member "AutoGenerateColumns" is not recognized or is not accessible
  2. The member "IsReadOnly" is not recognized or is not accessible"
  3. The member "CanUserReorderColumns" is not recognized or is not accessible"

Here are my assembly references in the header:

xmlns="http://schemas.microsoft.com/client/2007" 
xmlns:my="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data" 
xmlns:prim="clr-namespace:System.Windows.Controls.Primitives;assembly=System.Windows.Controls.Data"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows"
A: 

John,

This might be an issue of either the System.Windows.Controls.Data.dll not being referenced, or the assembly not being built. Try referencing the System.Windows.Controls.Data.dll and then rebuilding the solution, if that does not work, close all instances of both Blend and Visual Studio. Then try to re-launch and see if that takes care of the problem.

I hope this helps,

Thanks!

Scott