AUTOCOMPLETE SUGGESTIONS APPEARS ON TOP OF TEXT BOX -WINDOWS PHONE

夙愿已清 提交于 2019-12-13 07:47:08

问题


I am using auto complete textbox from windows phone toolkit.I need the list of suggestions below my textbox but it shows up above the text box .How do I make the suggestions appear below the text box..Here is my 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:


The location of the popup is determined based on the available size. If there's more space above the AutoCompleteTextBox, it will pop up. You can see this in the popuphelper.cs source file where the code arranges the popup.

There really isn't an option to override the behavior.



来源:https://stackoverflow.com/questions/21752544/autocomplete-suggestions-appears-on-top-of-text-box-windows-phone

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!