我发现Windows 8文本框有一个属性“IsPredictionEnabled”。据我所知,它用于启用自动完成功能。但即使使用软键盘,设置此属性也无效。
如果我希望此搜索文本框能够搜索bing并检索与搜索查询相对应的一些图像,那该怎么办呢?
谢谢,
答案 0 :(得分:0)
最好使用像这样的cutom控件:
从bing获取搜索结果您需要使用bind api:
使用AutCompleteBoxWinRT:
导入命名空间:
xmlns:ab="using:AutoCompleteBox"
放置控件:
<Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
<ab:AutoCompleteBox Name="ABBox" Text="{Binding Text, Mode=TwoWay}" WatermarkText="Type something" />
<Button Content="Test" VerticalAlignment="Top" Margin="0,100,0,0" Command="{Binding TestCommand}" />
</Grid>
此处您可以下载示例应用:LINK