1
所以,我有这个ListBox
写在XAML:我们可以更改ListBox的选定项目颜色吗?
<ListBox Margin="0" x:Name="ListBox_Main" Grid.Row="1" VerticalAlignment="Top" FontSize="24" SelectionChanged="ListBox_Main_SelectionChanged" Foreground="Black">
<ListBoxItem Content="Item 1" Background="#19000000" />
<ListBoxItem Content="Item 2" Background="#19000000" />
<ListBoxItem Content="Item 3" Background="#19000000" />
<ListBoxItem Content="Item 4" Background="#19000000"/>
<ListBoxItem Content="Item 5" Background="#19000000"/>
</ListBox>
我可以改变的背景,前景颜色,列表框中的项目的文本,但没有选项来改变颜色,当任何项目被选中时,它默认为蓝色:
我们可以改变那个蓝色吗?
这有你需要的所有信息:http://stackoverflow.com/questions/5519845/change-the-selected-color-listbox – LightStriker