Class DrawCellEventArgs
Provides data for the DrawCell event of the SfCalendar control.
Inheritance
Namespace: Syncfusion.WinForms.Input.Events
Assembly: Syncfusion.SfInput.WinForms.dll
Syntax
public class DrawCellEventArgs : Object
Constructors
DrawCellEventArgs(Nullable<DateTime>, Int32, Int32, String, Rectangle, Graphics, Color, Color, Boolean, Boolean, Boolean, Boolean, CalendarViewType)
Initializes a new instance of the DrawCellEventArgs class.
Declaration
public DrawCellEventArgs(Nullable<DateTime> date, int row, int column, string text, Rectangle bounds, Graphics graphics, Color backColor, Color foreColor, bool handle, bool istrailing, bool isspecial, bool isblackout, CalendarViewType viewtype)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Nullable<System.DateTime> | date | DateTime value of the cell. |
| System.Int32 | row | Row index of the cell. |
| System.Int32 | column | Column index of the cell. |
| System.String | text | Text of the cell. |
| System.Drawing.Rectangle | bounds | Cell bounds |
| System.Drawing.Graphics | graphics | To draw the Image and text |
| System.Drawing.Color | backColor | BackColor of the Cell |
| System.Drawing.Color | foreColor | ForeColor of the cell |
| System.Boolean | handle | To handle the event or not |
| System.Boolean | istrailing | Corresponding date is not a active month |
| System.Boolean | isspecial | Corresponding date is special date |
| System.Boolean | isblackout | Corresponding date is blackout date |
| CalendarViewType | viewtype | ViewType of the calendar |
Properties
BackColor
Gets or sets the background color of date cell to draw in SfCalendar.
Declaration
public Color BackColor { get; set; }
Property Value
| Type |
|---|
| System.Drawing.Color |
CellBounds
Gets the image bounds of the date cell to draw in SfCalendar.
Declaration
public Rectangle CellBounds { get; }
Property Value
| Type |
|---|
| System.Drawing.Rectangle |
ColumnIndex
Gets the column index of cell to draw in SfCalendar.
Declaration
public int ColumnIndex { get; }
Property Value
| Type |
|---|
| System.Int32 |
ForeColor
Gets or sets the foreground color of date cell to draw in SfCalendar.
Declaration
public Color ForeColor { get; set; }
Property Value
| Type |
|---|
| System.Drawing.Color |
Graphics
Gets the Graphics to custom draw Cell in SfCalendar.
Declaration
public Graphics Graphics { get; }
Property Value
| Type |
|---|
| System.Drawing.Graphics |
Handled
Gets or sets a value indicating whether to custom draw Cell in SfCalendar.
Declaration
public bool Handled { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
HorizontalAlignment
Gets or sets the horizontal alignment of the date text in the cell in SfCalendar.
Declaration
public StringAlignment HorizontalAlignment { get; set; }
Property Value
| Type |
|---|
| System.Drawing.StringAlignment |
Image
Gets or sets the image for the date cell to draw in SfCalendar.
Declaration
public Image Image { get; set; }
Property Value
| Type |
|---|
| System.Drawing.Image |
ImageBounds
Gets or sets the image bounds of the date cell to draw in SfCalendar.
Declaration
public Rectangle ImageBounds { get; set; }
Property Value
| Type |
|---|
| System.Drawing.Rectangle |
IsBlackoutDate
Gets a value indicating whether the date of cell is BlackoutDate in SfCalendar.
Declaration
public bool IsBlackoutDate { get; }
Property Value
| Type |
|---|
| System.Boolean |
IsSpecialDate
Gets a value indicating whether the date of cell is SpecialDate in SfCalendar.
Declaration
public bool IsSpecialDate { get; }
Property Value
| Type |
|---|
| System.Boolean |
IsTrailingDate
Gets a value indicating whether the date of cell is Trailing date for current month.
Declaration
public bool IsTrailingDate { get; }
Property Value
| Type |
|---|
| System.Boolean |
IsWeekNumber
Gets or sets a value indicating whether the date of cell is Week end in SfCalendar.
Declaration
public bool IsWeekNumber { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
RowIndex
Gets the row index of cell to draw in SfCalendar.
Declaration
public int RowIndex { get; }
Property Value
| Type |
|---|
| System.Int32 |
Text
Gets or sets the Text for the date cell to draw in SfCalendar.
Declaration
public string Text { get; set; }
Property Value
| Type |
|---|
| System.String |
Value
Gets the DateTime Value for the date cell to draw in SfCalendar.
Declaration
public Nullable<DateTime> Value { get; }
Property Value
| Type |
|---|
| System.Nullable<System.DateTime> |
VerticalAlignment
Gets or sets the vertical alignment of the date text in the cell in SfCalendar.
Declaration
public StringAlignment VerticalAlignment { get; set; }
Property Value
| Type |
|---|
| System.Drawing.StringAlignment |
ViewType
Gets or sets the CalendarViewType of the cell to draw in SfCalendar, whether it is month, year, decade or century view in SfCalendar.
Declaration
public CalendarViewType ViewType { get; set; }
Property Value
| Type |
|---|
| CalendarViewType |