用Grid布局,只想顯示水平網格線,showgridlines是網格線水平垂直都顯示,不知怎樣才能只顯示水平方向的
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="gridDemo" Height="300" Width="300">
VerticalAlignment="Stretch"
Margin="0" >
<Grid HorizontalAlignment="Stretch" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2"
VerticalAlignment="Stretch"
Margin="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Border BorderThickness="1" BorderBrush="Red" Grid.ColumnSpan="2" Grid.RowSpan="2" />
</Grid>
<Grid HorizontalAlignment="Stretch" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2"
VerticalAlignment="Stretch"
Margin="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Border BorderThickness="1" BorderBrush="Red" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
</Grid>
</Grid>