Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port "TextSearch.Text" attached property from WPF #6232

Closed
maxkatz6 opened this issue Jul 10, 2021 · 0 comments · Fixed by #7594
Closed

Port "TextSearch.Text" attached property from WPF #6232

maxkatz6 opened this issue Jul 10, 2021 · 0 comments · Fixed by #7594
Labels
enhancement help-wanted A contribution from the community would be most welcome.

Comments

@maxkatz6
Copy link
Member

maxkatz6 commented Jul 10, 2021

Is your feature request related to a problem? Please describe.
Right now ComboBox/ItemsControl search feature uses Content?.ToString() to find items.
To make it flexible we need TextSearch.Text property, like it exists in WPF.

Describe the solution you'd like

<ComboBox IsTextSearchEnabled="True">
  <Image TextSearch.Text="Cat" Source="data\cat.png"/>
  <Image TextSearch.Text="{Binding Name}" Source="data\dog.png"/>
  <Image TextSearch.Text="{CompiledBinding Name}" Source="data\fish.png"/>
</ComboBox>
<ComboBox IsTextSearchEnabled="True" Items="{Binding Items}">
  <ComboBox.ItemTemplate>
     <DataTemplate>
       <Image TextSearch.Text="{Binding Name}" Source="{Binding Source}"/>
     </DataTemplate>
  </ComboBox.ItemTemplate>
</ComboBox>

Describe alternatives you've considered
WPF also has "TextSearch.TextPath" property, but we want to avoid reflection-based features as much as possible, unless it's possible to easily implement it in compile-time way. Also having "TextSearch.Text" more than enough to have text search flexible.

Additional context
https://docs.microsoft.com/en-us/dotnet/api/system.windows.controls.textsearch?view=net-5.0

@maxkatz6 maxkatz6 added the help-wanted A contribution from the community would be most welcome. label Jul 10, 2021
@pr8x pr8x mentioned this issue Feb 13, 2022
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement help-wanted A contribution from the community would be most welcome.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant