本文介绍了C#WPF gridsplitter在水平时不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我必须使用gridsplitter:
所以当它垂直时它起作用:
I have to use a gridsplitter:
so when vertical it works:
<Grid Grid.Column="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Border Grid.Column="0" Background="Transparent" BorderBrush="Gainsboro" BorderThickness="3" />
<GridSplitter Grid.Column="1" Width="10"/>
<Border Grid.Column="2" Background="Transparent" BorderBrush="Gainsboro" BorderThickness="3" />
</Grid>
而不是水平时它不是:
instead when horizontal it doesn't:
<Grid Name="grdReport_RTFBeretta" Grid.Column="1">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Border Grid.Row="0" Background="Transparent" BorderBrush="Gainsboro" BorderThickness="3" />
<GridSplitter Grid.Row="1" Height="10"/>
<Border Grid.Row="2" Background="Transparent" BorderBrush="Gainsboro" BorderThickness="3" />
</Grid>
感谢您的帮助
Patrick
我尝试了什么:
我试图放/更改Vertical / HorizontalAlignment =Stretch但是没有改变任何。
Thank you for any help
Patrick
What I have tried:
I have tried to put/change Vertical/HorizontalAlignment="Stretch" but that didn't change anything.
推荐答案
这篇关于C#WPF gridsplitter在水平时不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!