我如何在WPF的rowDefinitions中添加2个按钮



我想创建一个wpf应用程序,它有三行,顶部行包含文本,按钮和图标

这是解决方案,但这取决于您希望如何显示控件。

<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" Orientation="Horizontal">
<TextBlock Text="Text"/>
<Button Content="Button"/>
<!-- Add more controls -->
</StackPanel>
</Grid>

最新更新