Selecting a Textbox Item in a Listbox does not change the selected item of the listbox

后端 未结 15 1405
清酒与你
清酒与你 2020-11-27 04:10

I Have a wpf Listbox that display\'s a list of textboxes. When I click on the Textbox the Listbox selection does not change. I have to click next to the TextBox to select th

15条回答
  •  爱一瞬间的悲伤
    2020-11-27 05:01

    The following is a simplification of @Ben's answer without having to override the DataTemplate. It can even be applied as a static style. Tested with a ListView containing a GridView > GridViewColumn > TextBox.

    Example:

    
        
    
    

提交回复
热议问题