Change combo box item list depending on the Textbox Text

后端 未结 3 884
广开言路
广开言路 2021-01-27 16:29

I have two columns in my grid:

Name(Textbox) ---- ParentList(combobox).

A ----------------------- It sh

3条回答
  •  半阙折子戏
    2021-01-27 16:54

    You can make the ItemsSource as MultiBinding to be binded to the list and the textbox, and in the converter go over the list, and hide items you don't want (according to the textbox).

    Not a too nice solution, but it should work.

    This is the multibinding:

    
      
      
    
    

    And in the convert method run with foreach on the parnetlist, and conditions that if the ListItem equals the text, it should be collapsed.

提交回复
热议问题