如何使 ComboBox 填充 UWP 中包含的网格线的所有 space

How to make a ComboBox fill all the space of the Grid line where it is contained in UWP

我正在将 WPF 应用程序迁移到 UWP,但我遇到了设计问题。如何使 ComboBox 填充包含它的网格线的所有 space?在 WPF 中,我使用了下面的代码。

                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="*"/>
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="150"/>
                                <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <TextBlock x:Uid="SpkPgTxtLanguage" Width="auto" Height="auto"  Grid.Column="0" Grid.Row="0" Margin="0,0,0,0" FontSize="12"/>
                            <ComboBox Name="cbxDefaultLanguage" Margin="3,3,3,3" Width="auto" Height="auto" Grid.Column="1" Grid.Row="0" >
                                <ComboBox.ItemTemplate>
                                    <DataTemplate>
                                        <StackPanel Orientation="Horizontal">
                                            <Image Source="{Binding Flag}" Width="32" Height="32" />
                                            <TextBlock Text="{Binding Name}" Margin="10, 0, 0, 0"  FontSize="12"/>
                                        </StackPanel>
                                    </DataTemplate>
                                </ComboBox.ItemTemplate>
                            </ComboBox>
                        </Grid>

在UWP中,可以将ComboBox.HorizontalAlignment设置为Stretch,也就是说ComboBox可以横向填充剩余的space

<ComboBox Name="cbxDefaultLanguage" Margin="3,3,3,3" HorizontalAlignment="Stretch" Grid.Column="1" Grid.Row="0" >
    ...
</ComboBox>

此致。