AUTOCOMPLETE建议出现在文本框 - 电话的顶部

时间:2014-02-13 11:12:32

标签: windows-phone-7 windows-phone-8 autocomplete windows-phone

我正在使用来自windows phone toolkit的自动完整文本框。我需要文本框下方的建议列表,但它显示在文本框上方。如何在文本框下方显示建议。这是我的XAML。

<Grid Margin="0,336,0,189" x:Name="editrow" Visibility="Visible">
                <Grid.RowDefinitions>
                    <RowDefinition Height="auto"></RowDefinition>
                    <RowDefinition Height="*"></RowDefinition>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="220" ></ColumnDefinition>
                    <ColumnDefinition Width="100"></ColumnDefinition>
                    <ColumnDefinition Width="100"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <toolkit:AutoCompleteBox x:Name="newname" FilterMode="StartsWith"  IsTextCompletionEnabled="True" Foreground="White" Background="#53000000" BorderThickness="0" Grid.Column="0" Grid.Row="0" Margin="10,0,0,0" IsDropDownOpen="True" RenderTransformOrigin="0,0">
                    <toolkit:AutoCompleteBox.ItemTemplate>
                        <DataTemplate>
                            <StackPanel Background="Gray" Orientation="Horizontal">
                                <TextBlock Text="{Binding }"/>
                            </StackPanel>
                        </DataTemplate>
                    </toolkit:AutoCompleteBox.ItemTemplate>
                </toolkit:AutoCompleteBox>
                <TextBox x:Name="rowquantity" Foreground="White" Background="#53000000" BorderThickness="0" Grid.Column="1" Grid.Row="0" InputScope="Number"></TextBox>
                <toolkit:ListPicker Grid.Row="0" x:Name="units" Foreground="White" BorderThickness="0" Background="#53000000" Grid.Column="2" ExpansionMode="FullScreenOnly" Margin="12,5,0,14" >
                    <toolkit:ListPicker.FullModeItemTemplate>
                        <DataTemplate>
                            <StackPanel Orientation="Horizontal" Margin="0 0 0 0">

                                <TextBlock Text="{Binding}"
                                 FontSize="32" LineHeight="1"/>
                            </StackPanel>
                        </DataTemplate>
                    </toolkit:ListPicker.FullModeItemTemplate>
                </toolkit:ListPicker>
                <Button Content="Add" BorderBrush="#53000000" Foreground="#53000000" Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="1" HorizontalAlignment="Right" VerticalAlignment="Top" Height="74" Click="Button_Click" Margin="0,0,3,0" Width="158"/>
            </Grid>

1 个答案:

答案 0 :(得分:1)

弹出窗口的位置取决于可用的大小。如果AutoCompleteTextBox上方有更多空格,它会弹出。您可以在代码排列弹出窗口的popuphelper.cs源文件中看到这一点。

确实没有覆盖行为的选项。