Class DayGrid
Represents a grid that consists of columns and rows which contain day cell elements.
Implements
Inherited Members
Namespace: Syncfusion.Windows.Shared
Assembly: Syncfusion.Shared.WPF.dll
Syntax
public class DayGrid : CalendarEditGrid, IDisposable
Constructors
DayGrid()
Initializes a new instance of the DayGrid class.
Declaration
public DayGrid()
Properties
CalendarMatrix
Gets or sets the matrix that represents days for the current date and culture.
Declaration
protected int[, ] CalendarMatrix { get; set; }
Property Value
Type | Description |
---|---|
System.Int32[,] | Type: CalendarMatrix |
DateCells
Gets or sets the collection of Date/DayCell pairs.
Declaration
protected Hashtable DateCells { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Hashtable | Type: System.Collections.Hashtable |
See Also
ParentCalendar
Gets or sets the parent.
Declaration
protected CalendarEdit ParentCalendar { get; set; }
Property Value
Type | Description |
---|---|
CalendarEdit | Type: CalendarEdit |
See Also
SelectionBorder
Gets or sets the selection border.
Declaration
protected Border SelectionBorder { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Controls.Border | Type: System.Windows.Controls.Border |
See Also
Methods
CreateCell()
Creates the instance of the single cell.
Declaration
protected override Cell CreateCell()
Returns
Type | Description |
---|---|
Cell | New instance of the cell. |
Overrides
Dispose()
Release the unmanaged resources of DayGrid.
Declaration
public void Dispose()
Dispose(Boolean)
Release the unmanaged resources of DayGrid.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing | Used to indicate perform dispose or not. |
Overrides
Initialize(VisibleDate, CultureInfo, Calendar)
Initializes the content of DayGrid.
Declaration
public override void Initialize(VisibleDate data, CultureInfo culture, Calendar calendar)
Parameters
Type | Name | Description |
---|---|---|
VisibleDate | data | Visible information. |
System.Globalization.CultureInfo | culture | Current culture. |
System.Globalization.Calendar | calendar | Current calendar. |
Overrides
OnVisualParentChanged(DependencyObject)
Invoked when the parent is changed.
Declaration
protected override void OnVisualParentChanged(DependencyObject oldParent)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyObject | oldParent | The previous parent. Set to a null reference (Nothing in Visual Basic) if the DependencyObject did not have a previous parent. |
SetDayCellContent()
Sets the SetDayCellContent() property of the DayCell.
Declaration
protected void SetDayCellContent()
SetDayCellDate(VisibleDate, DateTimeFormatInfo, Calendar)
Sets the day cell date.
Declaration
protected void SetDayCellDate(VisibleDate data, DateTimeFormatInfo format, Calendar calendar)
Parameters
Type | Name | Description |
---|---|---|
VisibleDate | data | The data value. |
System.Globalization.DateTimeFormatInfo | format | The date format. |
System.Globalization.Calendar | calendar | The calendar control. |
SetIsCurrentMonth(Int32)
Sets IsCurrentMonth to true if the cell date belongs to the current visible month.
Declaration
protected void SetIsCurrentMonth(int month)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | month | Current month. |
SetIsDate(Calendar)
Declaration
protected void SetIsDate(Calendar calendar)
Parameters
Type | Name | Description |
---|---|---|
System.Globalization.Calendar | calendar | The System.Globalization.Calendar for date transformation. |
SetIsFirstDayofMonth()
Sets IsFirstDayofMonth to true if the cell date is equal to FirstDay of the Month
Declaration
protected void SetIsFirstDayofMonth()
SetIsInvalid()
Declaration
protected void SetIsInvalid()
SetIsSelected()
Sets the selected cell.
Declaration
protected void SetIsSelected()
SetIsToday(Calendar)
Sets IsToday to true if the cell date is equal to today's date.
Declaration
protected void SetIsToday(Calendar calendar)
Parameters
Type | Name | Description |
---|---|---|
System.Globalization.Calendar | calendar | The System.Globalization.Calendar for date transformation. |
UpdateStyles(Style, StylesDictionary)
Updates styles on all cells.
Declaration
protected void UpdateStyles(Style style, StylesDictionary dateStyles)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Style | style | Style to be set. |
StylesDictionary | dateStyles | Collection of date/style pairs. |
Remarks
Date styles have higher priority than style.
UpdateTemplateAndSelector(DataTemplate, DataTemplateSelector, DataTemplatesDictionary)
Updates data template and data template selector on all cells.
Declaration
protected void UpdateTemplateAndSelector(DataTemplate template, DataTemplateSelector selector, DataTemplatesDictionary dateTemplates)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DataTemplate | template | Data template to be set to the cell. If it is null the local value of data template would be cleared. |
System.Windows.Controls.DataTemplateSelector | selector | Data template selector to be set to the cell. If it is null the local value would be cleared. |
DataTemplatesDictionary | dateTemplates | Collection of date/template pairs. |
Remarks
Both template and selector can not be set at the same time. Cells that have their date in the date/template list will not be updated.