Skip to main content

HorizontalSingleWeekCell.FirstVisible Property

Indicates whether the current cell is the first visible cell in the cell area of the Month view.

Namespace: DevExpress.XtraScheduler.Drawing

Assembly: DevExpress.XtraScheduler.v24.2.dll

Declaration

public bool FirstVisible { get; set; }

Property Value

Type Description
Boolean

True if the cell is the first (upper leftmost) cell in the Month view’s time cell area; otherwise, false.

Remarks

If the view is grouped, an upper leftmost cell in each group is considered the first visible cell.

Example

To identify the first visible cell in the Month View, handle the SchedulerControl.CustomDrawTimeCell event and check whether the HorizontalSingleWeekCell.FirstVisible property value is true.

The following code draws text in the Month view’s first visible cell, as illustrated in th picture below.

HorizontalSingleWeekCellFirstVisible

    scheduler.CustomDrawTimeCell += scheduler_CustomDrawTimeCell_01;
    scheduler.ActiveViewType = SchedulerViewType.Month;
    scheduler.GroupType = SchedulerGroupType.Date;
    scheduler.DateNavigationBar.Visible = false;
    scheduler.LookAndFeel.UseDefaultLookAndFeel = false;
    scheduler.LookAndFeel.Style = DevExpress.LookAndFeel.LookAndFeelStyle.Skin;
    scheduler.LookAndFeel.SkinName = "DevExpress Style";
    Font myFont = new Font("Tahoma", 8);
public static void scheduler_CustomDrawTimeCell_01(object sender, CustomDrawObjectEventArgs e) {
    e.DrawDefault();
    HorizontalSingleWeekCell cell = e.ObjectInfo as HorizontalSingleWeekCell;
    if (cell != null) {
        StringFormat sf = new StringFormat();
        sf.LineAlignment = StringAlignment.Center;
        e.Cache.DrawRectangle(SystemPens.ActiveBorder, cell.Bounds);
        if (cell.FirstVisible) e.Cache.DrawString("First Visible Cell", myFont,
                Brushes.Blue, cell.Bounds, sf);
    }
    e.Handled = true;
}
See Also