如何为所有网格行设置最小高度?

Col*_*nic 1 .net c# wpf grid

我想为网格中的所有行设置最小高度.这是xaml.

<Grid client:PopulateGrid.DataContext="{Binding Tabular}">
</Grid>
Run Code Online (Sandbox Code Playgroud)

网格由一些聪明的帮助程序代码(PopulateGrid类)填充.

是否可以为xaml中的所有行设置最小高度?

Roh*_*ats 5

default Style for RowDefinition在Grid资源下声明,以便将其应用于Grid中的所有行并在其中设置MinHeight.

    <Grid>
        <Grid.Resources>
            <Style TargetType="RowDefinition">
                <Setter Property="MinHeight" Value="10"/>
            </Style>
        </Grid.Resources>
    </Grid>
Run Code Online (Sandbox Code Playgroud)