[英]WinUI3 ComboBox and Button have different size
我们有一个ComboBox
和一个Button
彼此相邻。 它们在两个不同的Grid.Columns
中的同一个Grid.Row
中。
然而,它们似乎都有不同的大小。 即使通过设置VerticalAlignment="Stretch"
这也没有改变。
最后但同样重要的是,我为两个元素设置了固定高度,但它们的大小仍然不同。
那是怎么来的,我该如何改变它?
这适用于我的示例应用程序。
<Grid RowDefinitions="Auto,Auto">
<TextBlock Text="Test" Grid.Row="0" />
<Grid
Grid.Row="1"
ColumnDefinitions="Auto,Auto"
RowDefinitions="Auto,Auto">
<ComboBox
Grid.Row="1"
Grid.Column="0"
VerticalAlignment="Stretch"
CornerRadius="0"
SelectedIndex="0">
<TextBlock Text="Auswahlen" />
</ComboBox>
<Button
Grid.Row="1"
Grid.Column="1"
VerticalAlignment="Stretch"
CornerRadius="0">
<FontIcon
FontFamily="Segoe MDL2 Assets"
Glyph="" />
</Button>
</Grid>
</Grid>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.