[WPF] how to implement a basic SearchBox functionality to filter items in a ListBox

Roy 21 Reputation points
2021-09-11T21:16:43.527+00:00

I have been endlessly looking for some sort of solution that is not too complex, all I want is the simplest form of a search box so that when I type in a TextBox it filters out the items in a ListBox if a match is found, Just like how Windows 10 settings page works, If I type F it lists all the items that begin with F in the side bar and if I enter the full name of an item it just displays the matched item. I have attempted several times to do this but it ends up not working properly and its messy. I don't need any fancy features.

Below is an example of what I'm trying to achieve. This is the Windows 11 settings page.

https://youtu.be/96wF01RNBwA

Developer technologies | Windows Presentation Foundation
Developer technologies | C#
Developer technologies | C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
0 comments No comments
{count} votes

Answer accepted by question author
  1. Castorix31 91,506 Reputation points
    2021-09-11T21:44:28.37+00:00

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.