Change selected and unfocused Listbox style to not be grayed out

前端 未结 6 829
执念已碎
执念已碎 2020-12-03 01:27

I have a really simple WPF ListBox with SelectionMode set to Multiple.


When the ListBox loses

6条回答
  •  天命终不由人
    2020-12-03 01:27

    This is not an answer to the question, but I found this when I was looking for a way to disable selections in my listboxes. By using a slightly modified form of Guy's & bendewey's technique above, it turns out you can give the appearance of no selections in your listbox without replacing the underlying items control or anything like that. Here's the code I used:

    
      
    
    

    I also found the following MSDN page helpful:

    MSDN: SystemColors Members (System.Windows)

    Thanks for the help, guys.

提交回复
热议问题