Change disabled listbox background to gray

前端 未结 3 1085
孤街浪徒
孤街浪徒 2020-12-20 22:54

I have a ListBox which I need to gray out when it\'s disabled. Per user request it\'s not enough to disable it, but it also has to appear differently. shrug

3条回答
  •  天涯浪人
    2020-12-20 23:04

    sa_ddam213's answer didn't work for me so i thought i'd add what i found i had to do. In my case, i had set transparent background, but when i disabled the box it would turn gray. I wanted to be able to control the background of the listbox when the control was disabled and here's what i found to work.

    note: For your case, you'd want to change the Transparent color to whatever shade of Gray you want.
    note2: This will likely only work if you haven't changed the template for the listbox. (changing the datatemplate is ok).

    
        
    
    

提交回复
热议问题