zoukankan      html  css  js  c++  java
  • dateNavigator指定日期设置背景颜色

    触发CustomDrawDayNumberCell事件

     

    代码如下:

    private void dateNavigator1_CustomDrawDayNumberCell(object sender, DevExpress.XtraEditors.Calendar.CustomDrawDayNumberCellEventArgs e) {

     if(e.Date.DayOfWeek == DayOfWeek.Friday) {

        e.Graphics.FillRectangle(Brushes.Red, e.Bounds);

        e.Graphics.DrawString(e.Date.Day.ToString(), e.Style.Font, Brushes.White, e.Bounds);

        e.Handled = true;

     }

    }

    private void dateNavigator1_CustomDrawDayNumberCell(object sender, DevExpress.XtraEditors.Calendar.CustomDrawDayNumberCellEventArgs e) {

     if(e.Date.DayOfWeek == DayOfWeek.Friday) {

        e.Graphics.FillRectangle(Brushes.Red, e.Bounds);

        e.Graphics.DrawString(e.Date.Day.ToString(), e.Style.Font, Brushes.White, e.Bounds);

        e.Handled = true;

     }

    }

  • 相关阅读:
    Storm
    Linux 网络配置
    .NET Remoting
    jwt
    new操作符
    元数据
    C# lock
    三十而立
    面试
    灯火
  • 原文地址:https://www.cnblogs.com/linyijia/p/1829529.html
Copyright © 2011-2022 走看看