WPF grid怎么让它只显示水平网格线
用Grid布局,只想显示水平网格线,showgridlines是网格线水平垂直都显示,不知怎样才能只显示水平方向的
0 提建议
当前问题酬金
¥ 0 (可追加 ¥500)
支付方式
扫码支付
3 条回答 默认 最新
-
JackWang-CUMT 2015-09-08 00:40关注
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>
按下Enter换行,Ctrl+Enter发表内容
-
q107770540
2015-09-06 05:24
关注
border control can be used on each row to acheive this . border should be given with borderbrush and with required thickness...
本回答被题主选为最佳回答
, 对您是否有帮助呢?
本回答被专家选为最佳回答
, 对您是否有帮助呢?
本回答被题主和专家选为最佳回答
, 对您是否有帮助呢?
举报
按下Enter换行,Ctrl+Enter发表内容
冉,alive
2022-07-21 16:58
关注
竖直网线怎么加上?
本回答被题主选为最佳回答
, 对您是否有帮助呢?
本回答被专家选为最佳回答
, 对您是否有帮助呢?
本回答被题主和专家选为最佳回答
, 对您是否有帮助呢?
举报
按下Enter换行,Ctrl+Enter发表内容
查看更多回答(2条)