ClassCalendarView
Summary description for CalendarView.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public abstract class CalendarView : INotifyPropertyChanged
Inheritance: objectCalendarView
Derived Classes:
Implements:
Properties
AllowColumnHeaderSelectors
Gets or sets whether column headers ( if displayed by a MonthView object) will act as column selectors.
Declaration
public virtual bool AllowColumnHeaderSelectors { get; set; }
Property Value
AllowFishEye
Gets or sets whether the fish eye functionality is enabled.
AllowRowHeaderSelectors
Gets or sets whether row headers ( if displayed by a MonthView object) will act as row selectors.
Declaration
public virtual bool AllowRowHeaderSelectors { get; set; }
Property Value
AllowViewSelector
Gets or sets whether a selector for the entire CalendarView ( MonthView ) will appear on the calendar.
Declaration
public virtual bool AllowViewSelector { get; set; }
Property Value
Calendar
Gets the parent calendar that the current view is assigned to.
Declaration
[Browsable(false)]
public RadCalendar Calendar { get; }
Property Value
CellHorizontalSpacing
Gets or sets the horizontal spacing between the calendar cells
CellMargin
Gets or sets the margin of the view cells
CellPadding
Gets or sets the margin of the view cells
CellToolTipFormat
Gets or sets the format string that is applied to the days cells tooltip.
Declaration
public string CellToolTipFormat { get; set; }
Property Value
Remarks
The property should contain either a format specifier character or a custom format pattern. For more information, see the summary page for System.Globalization.DateTimeFormatInfo.
By default this property uses formatting string of 'dddd, MMMM dd, yyyy'. Valid formats are all supported by the .NET Framework.
Example:
- "d" is the standard short date pattern.
- "%d" returns the day of the month; "%d" is a custom pattern.
- "d " returns the day of the month followed by a white-space character; "d " is a custom pattern.
CellVerticalSpacing
Gets or sets the vertical spacing between the calendar cells
Children
Gets the collection of nodes that are assigned to the tree view control.
Declaration
public virtual CalendarViewCollection Children { get; }
Property Value
ColumnHeaderImage
Gets or sets the image displayed for the column header element.
Declaration
[Bindable(false)]
public Image ColumnHeaderImage { get; set; }
Property Value
The image displayed for the CalendarView column header element in the header cells. The default value is "".
Remarks
This property applies only if the ShowColumnHeaders property is set to true. If ColumnHeaderText is set too, its value is set as an alternative text to the image of the column header.
When using this property, the whole image URL is generated using also the value.
Example:
ShowColumnHeaders="true"
ImagesBaseDir = "Img/"
ColumnHeaderImage = "selector.gif"
complete image URL : "Img/selector.gif"
ColumnHeaderText
Gets or sets the text displayed for the column header element.
Declaration
[Bindable(false)]
public string ColumnHeaderText { get; set; }
Property Value
The text displayed for the CalendarView column header element. The default value is "".
Remarks
Use the ColumnHeaderText property to provide custom text for the CalendarView complete column header element.
![]() |
This property does not automatically encode to HTML. You need to convert special characters to the appropriate HTML value, unless you want the characters to be treated as HTML. For example, to explicitly display the greater than symbol (>), you must use the value >. |
Because this property does not automatically encode to HTML, it is possible to specify an HTML tag for the ColumnHeaderText property. For example, if you want to display an image for the next month navigation control, you can set this property to an expression that contains an <img> element.
This property applies only if the ShowColumnHeaders property is set to true.
Columns
Gets or sets the the count of columns to be displayed by a CalendarView.
CurrentCalendar
Gets the default System.Globalization.Calendar instance as specified by the default culture.
Declaration
[Browsable(false)]
public Calendar CurrentCalendar { get; }
Property Value
Remarks
A calendar divides time into measures, such as weeks, months, and years. The number, length, and start of the divisions vary in each calendar.
Any moment in time can be represented as a set of numeric values using a particular calendar. For example, the last vernal equinox occurred at (0.0, 0, 46, 8, 20, 3, 1999) in the Gregorian calendar. An implementation of Calendar can map any DateTime value to a similar set of numeric values, and DateTime can map such sets of numeric values to a textual representation using information from Calendar and DateTimeFormatInfo. The textual representation can be culture-sensitive (for example, "8:46 AM March 20th 1999 AD" for the en-US culture) or culture-insensitive (for example, "1999-03-20T08:46:00" in ISO 8601 format).
A Calendar implementation can define one or more eras. The Calendar class identifies the eras as enumerated integers where the current era (CurrentEra) has the value 0.
In order to make up for the difference between the calendar year and the actual time that the earth rotates around the sun or the actual time that the moon rotates around the earth, a leap year has a different number of days than a standard calendar year. Each Calendar implementation defines leap years differently.
For consistency, the first unit in each interval (for example, the first month) is assigned the value 1.
The System.Globalization namespace includes the following Calendar implementations: GregorianCalendar, HebrewCalendar, HijriCalendar, JapaneseCalendar, JulianCalendar, KoreanCalendar, TaiwanCalendar, and ThaiBuddhistCalendar.
HeaderHeight
The Height applied to a Header
HeaderWidth
The Width applied to a Header
IsMultipleView
Gets a value indicating whether the CalendarView has child views.
IsRootView
Gets a value indicating whether the CalendarView is the top most view displayed by RadCalendar.
Declaration
[Browsable(false)]
public virtual bool IsRootView { get; }
Property Value
Level
Gets the zero-based depth of the tree node in the RadTreeView tree. Returns -1 if the node is outside of a tree view.
MonthLayout
<p>Gets or sets the predefined pairs of rows and columns, so that the product of
the two values is exactly 42, which guarantees valid calendar layout. It is applied
on a single view level to every
Declaration
public virtual MonthLayout MonthLayout { get; set; }
Property Value
MultiViewColumns
Gets or sets the the count of columns to be displayed by a multi month CalendarView.
MultiViewRows
Gets or sets the the count of rows to be displayed by a multi month CalendarView.
Name
Gets or sets the name of the node.
NextView
Gets the next available view. Used for traversal of the calendar.
Declaration
[Browsable(false)]
public virtual CalendarView NextView { get; }
Property Value
Orientation
Gets or sets the orientation (rendering direction) of the calendar component. Default value is Horizontal.
Declaration
public Orientation Orientation { get; set; }
Property Value
Remarks
| Member | Description |
|---|---|
| Horizontal | Renders the calendar data row after row. |
| Vertical | Renders the calendar data column after column. |
Parent
Gets the parent tree node of the current tree node.
Declaration
[Browsable(false)]
public virtual CalendarView Parent { get; }
Property Value
PreviousView
Gets the previous available view. Used for traversal of the calendar.
Declaration
[Browsable(false)]
public virtual CalendarView PreviousView { get; }
Property Value
ReadOnly
Gets or sets a value indicating whether the calendar view is in read-only mode.
RootView
Gets the root parent node for this instance.
Declaration
[Browsable(false)]
public CalendarView RootView { get; }
Property Value
RowHeaderImage
Gets or sets the image displayed for the row header element.
Declaration
public Image RowHeaderImage { get; set; }
Property Value
The image displayed for the CalendarView row header element. The default value is "".
Remarks
This property applies only if the ShowRowHeaders property is set to true. If RowHeaderText is set too, its value is set as an alternative text to the image of the row header.
When using this property, the whole image URL is generated using also the value.
Example:
ShowRowHeaders = "true"
ImagesBaseDir = "Img/"
RowHeaderImage = "selector.gif"
complete image URL : "Img/selector.gif"
RowHeaderText
Gets or sets the text displayed for the row header element.
Declaration
[Bindable(false)]
public string RowHeaderText { get; set; }
Property Value
The text displayed for the CalendarView header element. The default value is "".
Remarks
Use the RowHeaderText property to provide custom text for the CalendarView complete row header element.
![]() |
This property does not automatically encode to HTML. You need to convert special characters to the appropriate HTML value, unless you want the characters to be treated as HTML. For example, to explicitly display the greater than symbol (>), you must use the value >. |
Because this property does not automatically encode to HTML, it is possible to specify an HTML tag for the RowHeaderText property. For example, if you want to display an image for the next month navigation control, you can set this property to an expression that contains an <img> element.
This property applies only if the ShowRowsHeaders property is set to true.
Rows
Gets or sets the the count of rows to be displayed by a CalendarView.
ShowColumnHeaders
Gets or sets whether a CalendarView object will display a header row.
Declaration
public virtual bool ShowColumnHeaders { get; set; }
Property Value
ShowHeader
Gets or sets whether a single CalendarView object will display a title row.
ShowOtherMonthsDays
Gets or sets whether the month matrix, when rendered will show days from other (previous or next) months or will render only blank cells.
Declaration
public virtual bool ShowOtherMonthsDays { get; set; }
Property Value
ShowRowHeaders
Gets or sets whether a CalendarView object will display a header column.
ShowSelector
Gets or sets whether a single CalendarView object will display a selector.
TitleAlign
Gets or sets the horizontal alignment of the view title.
The ContentAlignment enumeration is defined in System.Windows.Forms.VisualStyles
Declaration
public virtual ContentAlignment TitleAlign { get; set; }
Property Value
Remarks
|
Member name |
Description |
|---|---|
|
Center | The contents of a container are centered. |
| Left | The contents of a container are left justified. |
| Right | The contents of a container are right justified. |
TitleFormat
Gets or sets the format string used to format the text inside the header row.
ViewEndDate
Gets or sets a DateTime value specifying the ending date for the period handled by a CalendarView instance.
Declaration
public virtual DateTime ViewEndDate { get; set; }
Property Value
ViewRenderEndDate
Gets the DateTime object that is the last date to be rendered by CalendarView. While ViewEndDate is the start date that is handled by a particular CalendarView instance, the ViewRenderEndDate might belong to a different (next) CalendarView object.
Declaration
protected virtual DateTime ViewRenderEndDate { get; set; }
Property Value
ViewRenderStartDate
Gets the DateTime object that is the first date to be rendered by CalendarView. While ViewStartDate is the start date that is handled by a particular CalendarView instance, the ViewRenderStartDate might belong to a different (previous) CalendarView object.
Declaration
protected virtual DateTime ViewRenderStartDate { get; set; }
Property Value
ViewSelectorImage
Gets or sets the image displayed for the complete selection element in the view selector cell.
Declaration
[Bindable(false)]
public Image ViewSelectorImage { get; set; }
Property Value
The image displayed for the CalendarView selection element in the selector cell. The default value is "".
Remarks
When using this property, the whole image URL is generated using also the value.
Example:
ImagesBaseDir = "Img/"
ViewSelectorImage = "selector.gif"
complete image URL : "Img/selector.gif"
ViewSelectorText
Gets or sets the text displayed for the complete CalendarView selection element in the view selector cell.
Declaration
[Bindable(false)]
public string ViewSelectorText { get; set; }
Property Value
The text displayed for the CalendarView selection element in the selector cell. The default value is "".
Remarks
Use the ViewSelectorText property to provide custom text for the CalendarView complete selection element in the selector cell.
|
This property does not automatically encode to HTML. You need to convert special characters to the appropriate HTML value, unless you want the characters to be treated as HTML. For example, to explicitly display the greater than symbol (>), you must use the value >. |
Because this property does not automatically encode to HTML, it is possible to specify an HTML tag for the ViewSelectorText property. For example, if you want to display an image for the next month navigation control, you can set this property to an expression that contains an <img> element.
This property applies only if the EnableViewSelector property is set to true.
ViewStartDate
Gets or sets a DateTime value specifying the starting date for the period handled by a CalendarView instance.
Declaration
public virtual DateTime ViewStartDate { get; set; }
Property Value
Visible
Gets or sets a value indicating whether the tree node is visible or partially visible.
ZoomFactor
Gets or sets the zooming factor of a cell which is handled by the fish eye functionality.
Methods
CreateView(DateTime)
Creates a CalendarView object based on the logic implemented by the CalendarView instance that implements the method.
Declaration
protected virtual CalendarView CreateView(DateTime date)
Parameters
date
DateTime object that is used to create the CalendarView.
Returns
The created CalendarView object.
Dispose()
Declaration
public void Dispose()
EffectiveVisibleDate()
Returns the DateTime object that is used by the CalendarView to initialize.
Declaration
protected virtual DateTime EffectiveVisibleDate()
Returns
DateTime object that is used by the CalendarView to initialize.
EnsureChildViews()
Ensures that the child views collection is created.
Declaration
protected virtual void EnsureChildViews()
EnsureRenderSettings()
Verifies CalendarView settings required for correct presentation of calendrical information.
Declaration
protected virtual void EnsureRenderSettings()
GetNextViewDate()
Gets a DateTime object that is part of the date range handled by the next calendar view. Used for traversal of the calendar.
Declaration
protected virtual DateTime GetNextViewDate()
Returns
The DateTime object
GetPreviousViewDate()
Gets a DateTime object that is part of the date range handled by the previous calendar view. Used for traversal of the calendar.
Declaration
protected virtual DateTime GetPreviousViewDate()
Returns
The DateTime object
HandleDownKey(Keys)
handles the down arrow key.
Declaration
protected virtual void HandleDownKey(Keys keys)
Parameters
keys
The key data to be processed.
HandleEndKey(Keys)
handles the End key.
Declaration
protected virtual void HandleEndKey(Keys keys)
Parameters
keys
The key data to be processed.
HandleHomeKey(Keys)
handles the Home key.
Declaration
protected virtual void HandleHomeKey(Keys keys)
Parameters
keys
The key data to be processed.
HandleKeyDown(Keys)
handles key events that require processing from CalendarView.
HandleLeftKey(Keys)
handles the left arrow key.
Declaration
protected virtual void HandleLeftKey(Keys keys)
Parameters
keys
The key data to be processed.
HandlePageDownKey(Keys)
handles the page down key.
Declaration
protected virtual void HandlePageDownKey(Keys keys)
Parameters
keys
The key data to be processed.
HandlePageUpKey(Keys)
handles the page up key.
Declaration
protected virtual void HandlePageUpKey(Keys keys)
Parameters
keys
The key data to be processed.
HandleRightKey(Keys)
handles the right arrow key.
Declaration
protected virtual void HandleRightKey(Keys keys)
Parameters
keys
The key data to be processed.
HandleUpKey(Keys)
handles the up arrow key.
Declaration
protected virtual void HandleUpKey(Keys keys)
Parameters
keys
The key data to be processed.
IsDateInView(DateTime)
Determines if a DateTime object belongs to the dates range managed by a particular CalendarView.
OnNotifyPropertyChanged(PropertyChangedEventArgs)
Declaration
protected virtual void OnNotifyPropertyChanged(PropertyChangedEventArgs e)
Parameters
e
OnNotifyPropertyChanged(string)
Raises the PropertyChanged event
Declaration
protected virtual void OnNotifyPropertyChanged(string propertyName)
Parameters
propertyName
The name of the property
Select(DateTime)
Adds the specified date to the SelectedDates collection of RadCalendar.
Declaration
public virtual void Select(DateTime date)
Parameters
date
The DateTime object to add.
SelectRange(DateTime, DateTime)
Adds the specified range of dates to the SelectedDates collection of RadCalendar.
Declaration
public virtual void SelectRange(DateTime startDate, DateTime endDate)
Parameters
startDate
A System.DateTime that specifies the initial date to add to the SelectedDates collection.
endDate
A System.DateTime that specifies the end date to add to the SelectedDates collection.
SelectRange(DateTime[])
Adds the specified range of dates to the SelectedDates collection of RadCalendar.
Declaration
public virtual void SelectRange(DateTime[] dates)
Parameters
dates
DateTime[]
array of DateTime objects to add.
SetDateRange()
Initializes properly the ViewStartDate, ViewEndDate, ViewRenderStartDate, ViewRenderEndDate properties
Declaration
protected virtual void SetDateRange()
ToggleSelection(Keys)
Toogles the date selection (Enter key).
Declaration
protected virtual void ToggleSelection(Keys keys)
Parameters
keys
The key data to be processed.
Events
PropertyChanged
Occurs when when a property of an object changes change. Calling the event is developer's responsibility.
Declaration
[Browsable(false)]
public event PropertyChangedEventHandler PropertyChanged
Event Value
Implements
