WPF中修改ListBox项的样式并修改选中项的背景颜色


最终效果:

 1         "cmb">
 2             
 3             
 4                 
 5                 "{x:Static SystemColors.HighlightBrushKey}" Color="Transparent"/>
 6                 
 7                 "{x:Static SystemColors.ControlBrushKey}" Color="Red"/>
 8                 
 9                 "{x:Static SystemColors.HighlightTextBrushKey}" Color="Black"/>
10                 
11                 "{x:Static SystemColors.ControlTextBrushKey}" Color="Green"/>
12                 
42                         
43                     
44                 
45             
46         
WPF