-
Notifications
You must be signed in to change notification settings - Fork 0
/
Main.cs
34 lines (30 loc) · 1.1 KB
/
Main.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using System.Drawing.Drawing2D;
namespace WindowsApplication3 {
public partial class Main: XtraForm {
public Main() {
InitializeComponent();
}
private void OnCustomDrawItem(object sender, CustomDrawEventArgs e)
{
if (e.ItemInfo.CheckState == CheckState.Checked)
{
e.ItemInfo.Appearance.Font = new Font(e.ItemInfo.Appearance.Font, FontStyle.Bold | FontStyle.Underline);
}
if (e.ItemInfo.State == DevExpress.Utils.Drawing.ObjectState.Hot)
{
LinearGradientBrush brush = new LinearGradientBrush(e.ItemInfo.Bounds, Color.LightBlue, Color.Indigo, LinearGradientMode.ForwardDiagonal);
e.Cache.FillRectangle(brush, e.ItemInfo.Bounds);
e.CheckPainter.DrawObject(e.ItemInfo);
e.Handled = true;
}
}
}
}