New to Telerik UI for WinFormsStart a free 30-day trial

Summary description for CalendarView.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.UI.dll

Syntax:

C#
public abstract class CalendarView : INotifyPropertyChanged

Inheritance: objectCalendarView

Derived Classes: MonthView

Implements: INotifyPropertyChanged

Properties

Gets or sets whether column headers ( if displayed by a MonthView object) will act as column selectors.

C#
public virtual bool AllowColumnHeaderSelectors { get; set; }

Gets or sets whether the fish eye functionality is enabled.

C#
public virtual bool AllowFishEye { get; set; }

Gets or sets whether row headers ( if displayed by a MonthView object) will act as row selectors.

C#
public virtual bool AllowRowHeaderSelectors { get; set; }

Gets or sets whether a selector for the entire CalendarView ( MonthView ) will appear on the calendar.

C#
public virtual bool AllowViewSelector { get; set; }

Gets the parent calendar that the current view is assigned to.

C#
[Browsable(false)]
public RadCalendar Calendar { get; }

Gets or sets the horizontal spacing between the calendar cells

C#
public int CellHorizontalSpacing { get; set; }

Gets or sets the margin of the view cells

C#
public Padding CellMargin { get; set; }

Gets or sets the margin of the view cells

C#
public Padding CellPadding { get; set; }

Gets or sets the format string that is applied to the days cells tooltip.

C#
public string CellToolTipFormat { get; set; }
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.

Gets or sets the vertical spacing between the calendar cells

C#
public int CellVerticalSpacing { get; set; }

Gets the collection of nodes that are assigned to the tree view control.

C#
public virtual CalendarViewCollection Children { get; }

Gets or sets the image displayed for the column header element.

C#
[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"

Gets or sets the text displayed for the column header element.

C#
[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.

Gets or sets the the count of columns to be displayed by a CalendarView.

C#
public int Columns { get; set; }

Gets the default System.Globalization.Calendar instance as specified by the default culture.

C#
[Browsable(false)]
public Calendar CurrentCalendar { get; }
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.

The Height applied to a Header

C#
public virtual int HeaderHeight { get; set; }

The Width applied to a Header

C#
public virtual int HeaderWidth { get; set; }

Gets a value indicating whether the CalendarView has child views.

C#
public virtual bool IsMultipleView { get; }

Gets a value indicating whether the CalendarView is the top most view displayed by RadCalendar.

C#
[Browsable(false)]
public virtual bool IsRootView { get; }

Gets the zero-based depth of the tree node in the RadTreeView tree. Returns -1 if the node is outside of a tree view.

C#
[Browsable(false)]
public int Level { get; }

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

C#
public virtual MonthLayout MonthLayout { get; set; }

Gets or sets the the count of columns to be displayed by a multi month CalendarView.

C#
public int MultiViewColumns { get; set; }

Gets or sets the the count of rows to be displayed by a multi month CalendarView.

C#
public int MultiViewRows { get; set; }

Gets or sets the name of the node.

C#
public virtual string Name { get; set; }

Gets the next available view. Used for traversal of the calendar.

C#
[Browsable(false)]
public virtual CalendarView NextView { get; }

Gets or sets the orientation (rendering direction) of the calendar component. Default value is Horizontal.

C#
public Orientation Orientation { get; set; }
Remarks:
MemberDescription
HorizontalRenders the calendar data row after row.
VerticalRenders the calendar data column after column.

Gets the parent tree node of the current tree node.

C#
[Browsable(false)]
public virtual CalendarView Parent { get; }

Gets the previous available view. Used for traversal of the calendar.

C#
[Browsable(false)]
public virtual CalendarView PreviousView { get; }

Gets or sets a value indicating whether the calendar view is in read-only mode.

C#
public virtual bool ReadOnly { get; set; }

Gets the root parent node for this instance.

C#
[Browsable(false)]
public CalendarView RootView { get; }

Gets or sets the image displayed for the row header element.

C#
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"

Gets or sets the text displayed for the row header element.

C#
[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 &gt;.

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.

Gets or sets the the count of rows to be displayed by a CalendarView.

C#
public int Rows { get; set; }

Gets or sets whether a CalendarView object will display a header row.

C#
public virtual bool ShowColumnHeaders { get; set; }

Gets or sets whether a single CalendarView object will display a title row.

C#
public virtual bool ShowHeader { get; set; }

Gets or sets whether the month matrix, when rendered will show days from other (previous or next) months or will render only blank cells.

C#
public virtual bool ShowOtherMonthsDays { get; set; }

Gets or sets whether a CalendarView object will display a header column.

C#
public virtual bool ShowRowHeaders { get; set; }

Gets or sets whether a single CalendarView object will display a selector.

C#
public virtual bool ShowSelector { get; set; }

Gets or sets the horizontal alignment of the view title.

The ContentAlignment enumeration is defined in System.Windows.Forms.VisualStyles

C#
public virtual ContentAlignment TitleAlign { get; set; }
Remarks:

Member name

Description

Center

The contents of a container are centered.
LeftThe contents of a container are left justified.
RightThe contents of a container are right justified.

Gets or sets the format string used to format the text inside the header row.

C#
public virtual string TitleFormat { get; set; }

Gets or sets a DateTime value specifying the ending date for the period handled by a CalendarView instance.

C#
public virtual DateTime ViewEndDate { get; set; }

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.

C#
protected virtual DateTime ViewRenderEndDate { get; set; }

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.

C#
protected virtual DateTime ViewRenderStartDate { get; set; }

Gets or sets the image displayed for the complete selection element in the view selector cell.

C#
[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"

Gets or sets the text displayed for the complete CalendarView selection element in the view selector cell.

C#
[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 &gt;.

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.

Gets or sets a DateTime value specifying the starting date for the period handled by a CalendarView instance.

C#
public virtual DateTime ViewStartDate { get; set; }

Gets or sets a value indicating whether the tree node is visible or partially visible.

C#
public bool Visible { get; set; }

Gets or sets the zooming factor of a cell which is handled by the fish eye functionality.

C#
public virtual float ZoomFactor { get; set; }

Methods

C#
protected virtual DateTime AddViewPeriods(DateTime startDate, int periods)
Parameters:startDateDateTimeperiodsintReturns:

DateTime

C#
protected virtual CalendarView CreateView()
Returns:

CalendarView

Creates a CalendarView object based on the logic implemented by the CalendarView instance that implements the method.

C#
protected virtual CalendarView CreateView(DateTime date)
Parameters:dateDateTime

DateTime object that is used to create the CalendarView.

Returns:

CalendarView

The created CalendarView object.

C#
public void Dispose()

Returns the DateTime object that is used by the CalendarView to initialize.

C#
protected virtual DateTime EffectiveVisibleDate()
Returns:

DateTime

DateTime object that is used by the CalendarView to initialize.

Ensures that the child views collection is created.

C#
protected virtual void EnsureChildViews()

Verifies CalendarView settings required for correct presentation of calendrical information.

C#
protected virtual void EnsureRenderSettings()

Gets a DateTime object that is part of the date range handled by the next calendar view. Used for traversal of the calendar.

C#
protected virtual DateTime GetNextViewDate()
Returns:

DateTime

The DateTime object

Gets a DateTime object that is part of the date range handled by the previous calendar view. Used for traversal of the calendar.

C#
protected virtual DateTime GetPreviousViewDate()
Returns:

DateTime

The DateTime object

handles the down arrow key.

C#
protected virtual void HandleDownKey(Keys keys)
Parameters:keysKeys

The key data to be processed.

handles the End key.

C#
protected virtual void HandleEndKey(Keys keys)
Parameters:keysKeys

The key data to be processed.

handles the Home key.

C#
protected virtual void HandleHomeKey(Keys keys)
Parameters:keysKeys

The key data to be processed.

handles key events that require processing from CalendarView.

C#
protected virtual bool HandleKeyDown(Keys keys)
Parameters:keysKeys

The key data to be processed.

Returns:

bool

handles the left arrow key.

C#
protected virtual void HandleLeftKey(Keys keys)
Parameters:keysKeys

The key data to be processed.

handles the page down key.

C#
protected virtual void HandlePageDownKey(Keys keys)
Parameters:keysKeys

The key data to be processed.

handles the page up key.

C#
protected virtual void HandlePageUpKey(Keys keys)
Parameters:keysKeys

The key data to be processed.

handles the right arrow key.

C#
protected virtual void HandleRightKey(Keys keys)
Parameters:keysKeys

The key data to be processed.

handles the up arrow key.

C#
protected virtual void HandleUpKey(Keys keys)
Parameters:keysKeys

The key data to be processed.

Determines if a DateTime object belongs to the dates range managed by a particular CalendarView.

C#
public bool IsDateInView(DateTime date)
Parameters:dateDateTime

The DateTime object to be tested.

Returns:

bool

True if the DateTime object belongs to the dates range managed by a particular CalendarView; False otherwise.

C#
protected virtual void OnNotifyPropertyChanged(PropertyChangedEventArgs e)
Parameters:ePropertyChangedEventArgs

Raises the PropertyChanged event

C#
protected virtual void OnNotifyPropertyChanged(string propertyName)
Parameters:propertyNamestring

The name of the property

Adds the specified date to the SelectedDates collection of RadCalendar.

C#
public virtual void Select(DateTime date)
Parameters:dateDateTime

The DateTime object to add.

Adds the specified range of dates to the SelectedDates collection of RadCalendar.

C#
public virtual void SelectRange(DateTime startDate, DateTime endDate)
Parameters:startDateDateTime

A System.DateTime that specifies the initial date to add to the SelectedDates collection.

endDateDateTime

A System.DateTime that specifies the end date to add to the SelectedDates collection.

Adds the specified range of dates to the SelectedDates collection of RadCalendar.

C#
public virtual void SelectRange(DateTime[] dates)
Parameters:datesDateTime[]

array of DateTime objects to add.

Initializes properly the ViewStartDate, ViewEndDate, ViewRenderStartDate, ViewRenderEndDate properties

C#
protected virtual void SetDateRange()

Toogles the date selection (Enter key).

C#
protected virtual void ToggleSelection(Keys keys)
Parameters:keysKeys

The key data to be processed.

Events

Occurs when when a property of an object changes change. Calling the event is developer's responsibility.

C#
[Browsable(false)]
public event PropertyChangedEventHandler PropertyChanged

Implements: INotifyPropertyChanged.PropertyChanged