コード例 #1
0
        internal void RaiseCustomDrawItem(CustomDrawEventArgs e)
        {
            CustomDrawEventHandler handler = (CustomDrawEventHandler)Events[customDraw];

            if (handler != null)
            {
                handler(GetEventSender(), e);
            }
        }
        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.Graphics.FillRectangle(brush, e.ItemInfo.Bounds);
                e.CheckPainter.DrawObject(e.ItemInfo);

                e.Handled = true;
            }
        }