Disable blue border for selected Listview item

后端 未结 4 940
执念已碎
执念已碎 2020-12-19 23:37

I have a ListView with Horizontal WrapPanel as its ItemsPanelTemplate. I want to get rid of the blue background for selected item. It is visible only on the left of the sele

4条回答
  •  粉色の甜心
    2020-12-20 00:15

    You need to overwrite the SystemColors.HighlightBrushKey for the ListView to be Transparent (or whatever color you want)

    I typically put this in the ListView.Resources so it only applies to the specific ListView, and not all ListViews in my application

    
        
    
    

    Its very close to what you have in your code already, but you need to set it for the ListView.Resources, not ListViewItem.Resources

提交回复
热议问题