例如,我有这个标记:
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Center">
<Button x:Name="PreviousPage"
Content="Previous" />
<Button x:Name="Info"
Content="Information" />
<Button x:Name="InetTicket"
Content="Internet ticket" />
<Button x:Name="FindStation"
Content="Find station" />
<Button x:Name="NextPage"
Content="Next" />
</StackPanel>
</Grid>
如何确定最宽的按钮并与其他按钮共享它的大小。所以按钮最后应该是相同的宽度。如何使用 xaml 完成这样的任务?