System colour for inactive selected items in a listview?
Is there any system colour that define the background of a listview item when the control has no 开发者_如何学JAVAfocus and the selection is not hidden? I'm not able to find it if so.
EDIT: I think it is the one listed in .Net as MenuBar (or ControlFace, or Control), but it would be nice if someone could confirm it.
I have always used the SystemColors.Control
color for that and it's never not matched.
If using VisualStyles
, you can try rendering it yourself:
var vsr = new VisualStyleRenderer(
VisualStyleElement.ListView.Item.SelectedNotFocus);
vsr.DrawBackground(e.Graphics, rect);
精彩评论