I’ve a Silverlight app (Silverlight 4 in VS2010) wherein I’ve a datagrid. I wanted to set the border for the datagrid rows. So in the <DataTemplate> I wrote this:
<Border BorderBrush="Black" BorderThickness="1"></Border>
This worked. Now I wanted to draw border only in the bottom and right and I did this:
<Border BorderBrush="Black">
<Border.BorderThickness>
<Thickness Bottom="1" Left="0" Top="0" Right="1"/>
</Border.BorderThickness>
</Border>
But this throws a XAML parsing error – Cannot set the read-only property Bottom
Why would this happen? Is there any alternatives to do the same?
1 Answer