In ItemSelectionChanged Event
private void lsvTime_ItemSelectionChanged(object sender,ListViewItemSelectionChangedEventArgs e)
{
if (e.Item.Selected)
{
e.Item.BackColor = System.Drawing.SystemColors.MenuHighlight;
e.Item.ForeColor = System.Drawing.SystemColors.HighlightText;
}
else
{
e.Item.BackColor = Color.White;
e.Item.ForeColor = Color.Black;
}
}
private void lsvTime_ItemSelectionChanged(object sender,ListViewItemSelectionChangedEventArgs e)
{
if (e.Item.Selected)
{
e.Item.BackColor = System.Drawing.SystemColors.MenuHighlight;
e.Item.ForeColor = System.Drawing.SystemColors.HighlightText;
}
else
{
e.Item.BackColor = Color.White;
e.Item.ForeColor = Color.Black;
}
}