我们可以在列表框项目中搜索名称吗? [英] Can we search the name in the listbox items??

查看:59
本文介绍了我们可以在列表框项目中搜索名称吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨专家..

我的应用程序中有一个列表框。我将在该UI中运行时绑定数据。现在我想搜索该列表框中的名称。

I have one listbox in my application. I will bind the data at run time in that UI. Now i want search the names in that list box.

是否可以在列表框中搜索?

Is it possible to search in the listbox??

如果可能,请告诉我我如何使用文本框搜索名称?

If it is possible mean please tell me how to search the name using textbox?

我的列表框Xaml

 <ListBox  Background="Azure" ItemsSource="{Binding Content,Mode=TwoWay}" HorizontalAlignment="Left" Margin="0,230,0,0" Name="OutGoingInvitationList" VerticalAlignment="Top" Width="468" BorderBrush="#00565353" SelectionChanged="listBox1_SelectionChanged">
                    
<ListBox.ItemTemplate>
                        
<DataTemplate>
                            
<StackPanel Orientation="Horizontal">
                                
<Image Name="ListPersonImage" Source="{Binding ListImage}" Height="100" Width="100" Stretch="Uniform" Margin="10,2,0,0" ImageFailed="Image_ImageFailed" />
                                
<TextBlock Text="{Binding ListFullName}" Name="ListPersonFullName" Width="200" Foreground="Black" Margin="10,10,0,0" FontWeight="SemiBold" FontSize="22" />
                                
<TextBlock Text="{Binding ListBio}" Name="ListPersonBio" FlowDirection="LeftToRight" Foreground="Black" Margin="-200,50,0,0" FontWeight="ExtraLight" FontSize="20" />
                            
</StackPanel>
                        
</DataTemplate>
                    
</ListBox.ItemTemplate>
                
</ListBox>

提前致谢。 。

推荐答案

搜索您绑定的数据,即忽略列表框
You search the data you are bound to, i.e. ignore the listbox


这篇关于我们可以在列表框项目中搜索名称吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆