[WPF] 於ListView 中自訂Key Search

為了提高UX, 在ListView中輸入字符時, 通常都會跳去指定的item中, 然而用Bind 了object 後若須要指定用什麼property 進行搜尋, 則需要再作設定.

在WPF中, 無須特別去加code 作customize search, 只須於XAML 中指定attribute 便可.

例子: 

<ListView 
    TextSearch.TextPath="FirstName"
/>

 

About C.H. Ling 260 Articles
a .net / Java developer from Hong Kong and currently located in United Kingdom. Thanks for Google because it solve many technical problems so I build this blog as return. Besides coding and trying advance technology, hiking and traveling is other favorite to me, so I will write down something what I see and what I feel during it. Happy reading!!!

Be the first to comment

Leave a Reply

Your email address will not be published.


*


This site uses Akismet to reduce spam. Learn how your comment data is processed.