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

Implement TextSearch.TextBinding #18405

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MrJul
Copy link
Member

@MrJul MrJul commented Mar 9, 2025

What does the pull request do?

This PR implements TextSearch.TextBinding.
This is the equivalent of WPF's TextSearch.TextPath.

This new property is used in SelectedItemsControl to search for items.
Additionally, ItemsControl.DisplayMemberBinding is used as a fallback, matching WPF.

For each item, the first non-empty text from the following list will be considered:

  • TextSearch.Text (if the item is a control)
  • TextSearch.TextBindingProperty - New
  • ItemsControl.DisplayMemberBinding - New
  • Content.ToString (if the item is a IContentControl)
  • ToString

Unit tests have been added.

Notes

@MrJul MrJul added feature api-approved The new public APIs have been approved. labels Mar 9, 2025
@MrJul MrJul mentioned this pull request Mar 9, 2025
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-approved The new public APIs have been approved. feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants