我想为网格中的所有行设置一个最小高度。这是 xaml。
<Grid client:PopulateGrid.DataContext="{Binding Tabular}">
</Grid>
网格由一些聪明的辅助代码(PopulateGrid 类)填充。
是否可以为 xaml 中的所有行设置最小高度?
最佳答案
在 Grid 资源下声明 RowDefinition 的默认样式
,以便它应用于您的 Grid 内的所有行并在其中设置 MinHeight。
<Grid>
<Grid.Resources>
<Style TargetType="RowDefinition">
<Setter Property="MinHeight" Value="10"/>
</Style>
</Grid.Resources>
</Grid>
关于c# - 如何为所有网格行设置最小高度?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21724592/