Thursday, October 8, 2009

WPF : Changing Listview Selected Item color

Hi All,

I am really loving WPF these days, all of the things which looked really tough to me earlier, are not simplified using WPF XAML.

Here is the code for changing the background color of the selected item in a listview :
Code :

< Style TargetType="ListViewItem">
< Style.Resources>
< SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="WhiteSmoke"/>
< SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}" Color="Transparent"/>


1 comment:

Anonymous said...

This is very inspiring work you have created for us. Some people need to know that these things can ensue to anyone. You have shown me a better view now.