How do I show Column and Row Borders of a UniformGrid (XAML / Expression Blend 3)?

Hi,
How do I show all cell borders of a UniformGrid element with a number of columns and rows.  

I'm using:
Expression Blend 3
XAML
C#
avtelAsked:
Who is Participating?
 
avtelAuthor Commented:
That's using regular Grid, not Uniform Grid.  I can't find an equivalent for ShowGridLines in the Uniform Grid control.
Is there any way to use SolidColorBrush to paint in the columns/rows of a UniformGrid?
0
 
CuteBugConnect With a Mentor Commented:
All you need to do is to have a Border as the first child in each of the cell of the grid.

Then you can place your elements within the border.

The sample code shows a uniform grid with a border for each cell
<UniformGrid Rows="2" Columns="2">
    <Border BorderBrush="Black" BorderThickness="1" Margin="0">
        <!--Place you element for 1st cell here-->
    </Border>
    <Border BorderBrush="Black" BorderThickness="1" Margin="0">
        <!--Place you element for 2nd cell here-->
    </Border>
    <Border BorderBrush="Black" BorderThickness="1" Margin="0">
        <!--Place you element for 3rd cell here-->
    </Border>
    <Border BorderBrush="Black" BorderThickness="1" Margin="0">
        <!--Place you element for 4th cell here-->
    </Border>
</UniformGrid>

Open in new window

0
 
avtelAuthor Commented:
Cheers - I reverted to a regular Grid, but I'm pretty sure your solution is on-point.
0
All Courses

From novice to tech pro — start learning today.