Beispiel #1
0
        protected override void OnDrawItemBackground(BetterListViewDrawItemBackgroundEventArgs eventArgs)
        {
            base.OnDrawItemBackground(eventArgs);

            if (eventArgs.Item.Selected)
            {
                Brush brushSelection = new SolidBrush(Color.FromArgb(128, Color.WhiteSmoke));
                eventArgs.Graphics.FillRectangle(brushSelection, eventArgs.ItemBounds.BoundsSelection);
                brushSelection.Dispose();
            }
        }
 private void lstUsers_DrawItemBackground(object sender, BetterListViewDrawItemBackgroundEventArgs eventArgs)
 {
     if (eventArgs.Item.Index % 2 == 0)
     {
         Brush brushSelection = new SolidBrush(Color.FromArgb(220,240,255));
         eventArgs.Graphics.FillRectangle(brushSelection, eventArgs.ItemBounds.BoundsSelection);
         brushSelection.Dispose();
     }
 }