我该如何在C#代码中将WPF控件的Height
属性值设置为"Auto
"?
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition Height="Auto" />
<RowDefinition />
<RowDefinition Height="Auto" />
<RowDefinition />
<RowDefinition Height="Auto" />
<RowDefinition />
<RowDefinition Height="Auto" />
<RowDefinition />
</Grid.RowDefinitions>
我想在代码后台中复制这种行为。 有什么想法吗?
GridLength.Auto
)。还有GridLength.Star
可以填充剩余区域。 - Wolfgang Schreurs