I have created XAML ,with grid structure ,with 3 or 4 rows ,each row containing two columns,If i want to set the color for the each row and border line around each row and column ,how can i achieve it.
I am new to this Ui creation in XAML especially,Anyidea regarding how to achieve this will be useful`
<TextBlock Foreground="Black" Text="Account Number :" Margin="10" Grid.ColumnSpan="2" />
<TextBlock Foreground="Black" x:Name="accNO" Text="" Grid.Column="2" Margin="10"/>
<TextBlock Foreground="Black" Text="Currency :" Grid.Row="1" Margin="10" Grid.ColumnSpan="2" />
<TextBlock Foreground="Black" x:Name="accCurr" Text="" Grid.Row="1" Grid.Column="2" Margin="10"/>
<TextBlock Foreground="Black" Text="Acount Balance :" Grid.Row="2" Margin="10" Grid.ColumnSpan="2" />
<TextBlock Foreground="Black" x:Name="accOBal" Text="" Grid.Row="2" Grid.Column="2" Margin="10"/>
<TextBlock Foreground="Black" Text="Available Balance :" Grid.Row="3" Margin="10" Grid.ColumnSpan="2" />
<TextBlock Foreground="Black" x:Name="avBal" Text="" Grid.Row="3" Grid.Column="2" Margin="10"/>
</Grid>`
I have updated codes for getting table as my requirements
<Border Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" BorderThickness="1" BorderBrush="White">
<Border.Background>
<LinearGradientBrush EndPoint="1,0" StartPoint="1,1">
<GradientStop Color="LightGray" Offset="0" />
<GradientStop Color="LightGray" Offset="1" />
</LinearGradientBrush>
</Border.Background>
<TextBlock Foreground="Black" Text="Account Number :" Margin="10" Grid.ColumnSpan="2" />
</Border>
<Border Grid.Row="0" Grid.Column="2" BorderThickness="1" BorderBrush="White">
<TextBlock Foreground="Black" x:Name="accNO" Text="" Grid.Column="2" Margin="10"/>
</Border>
Thanks For help.It was done for the first row of grid.
If you want border around each row and column, then set the Border element inside every row and column