WP8.1 Combobox 在其他控件下打开

WP8.1 Combobox opens under other controls

我有以下问题, 我在 winphone8.1 上的组合框在其他控件下打开其项目.. 任何人都可以解决解决方案吗?

<Grid>
  <Grid.RowDefinitions>
    <RowDefinition Height="*"/>
    <RowDefinition Height="*"/>
    <RowDefinition Height="*"/>
  </Grid.RowDefinitions>

  <Combobox Grid.Row="0"/>
  <TextBox Grid.Row="1"/>
  <TextBox Grid.Row="2"/>
</Grid>

如果您希望您的控件覆盖其他项目,而不是推送它们,只需为您的控件提供一个 RowSpan。它使控件跨越多行。

<Grid>
  <Grid.RowDefinitions>
    <RowDefinition Height="*"/>
    <RowDefinition Height="*"/>
    <RowDefinition Height="*"/>
  </Grid.RowDefinitions>

  <TextBox Grid.Row="1"/>
  <TextBox Grid.Row="2"/>
  <Combobox Grid.Row="0" Grid.RowSpan="3"/>
</Grid>

注意 Combobox 是在 TextBox 之后声明的,以便在它们前面并覆盖它们。

在旁注中,如果 Grid.Row(或列)为 0,则无需显式设置,因为这是其默认值。所以你可以在你的 Combobox 上省略 Grid.Row="0" 。将 * 设置为 row/column 定义的高度或宽度时也是如此。可以缩短为

<RowDefinition/>