Windows phone 7 WP7自动完成,带有要搜索的绑定和要显示的绑定
我对WP7中的自动完成文本框有问题。 目前,我已经设法通过“标题”搜索客户,然后显示带有“标题”和“地址”的选项。但是如何在自动完成文本框中显示这两个绑定?我可以在我的datatemplate中显示这两个选项,但当我选择时,它将只显示ValueMemberBinding绑定Windows phone 7 WP7自动完成,带有要搜索的绑定和要显示的绑定,windows-phone-7,binding,autocomplete,Windows Phone 7,Binding,Autocomplete,我对WP7中的自动完成文本框有问题。 目前,我已经设法通过“标题”搜索客户,然后显示带有“标题”和“地址”的选项。但是如何在自动完成文本框中显示这两个绑定?我可以在我的datatemplate中显示这两个选项,但当我选择时,它将只显示ValueMemberBinding绑定 <toolkit:AutoCompleteBox x:Name="acBox" ValueMemberBinding="{Binding Title}" ItemsSource="{Binding Address}"
<toolkit:AutoCompleteBox x:Name="acBox" ValueMemberBinding="{Binding Title}" ItemsSource="{Binding Address}" HorizontalAlignment="Left" Margin="6,126,0,436" Width="420" Height="72">
<toolkit:AutoCompleteBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding Title}"></TextBlock>
<TextBlock FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="#ff666666"
Text="{Binding Address}"></TextBlock>
</StackPanel>
</DataTemplate>
</toolkit:AutoCompleteBox.ItemTemplate>
</toolkit:AutoCompleteBox>
你能分享codebehind的代码吗?你用什么绑定ItemsSource?它是一个WCF服务,我用它作为文本框var results=e.Result的ItemsSource;this.acBox.ItemsSource=results.OrderByDescending(a=>a.Title);如上所述,我可以在文本框中显示这两个绑定吗?怎么办?已排序并包含标题、地址等。