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.v19.2.dll
Declaration
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.
Note
A complete sample project is available at https://github.com/DevExpress-Examples/winforms-schedulercontrol-api-t224044
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;
}
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the FirstVisible property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.