ListBox Selected Item Background

前端 未结 2 1499
一生所求
一生所求 2020-12-06 23:44

I\'m trying to change the background of the selected item in a WPF ListBox.

I have attempted to implement a style for it, but for some reason it\'s not being applied

2条回答
  •  -上瘾入骨i
    2020-12-07 00:44

    For anyone searching for this in the future, the accepted answer doesn't actually apply the colour when control is not focused for me. The following should be used instead which appears to work as intended.

    
    

提交回复
热议问题