Class
CalendarView

Summary description for CalendarView.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.UI.dll

Syntax:

cs-api-definition
public abstract class CalendarView : INotifyPropertyChanged

Inheritance: objectCalendarView

Derived Classes: MonthView

Implements: INotifyPropertyChanged

Properties

AllowColumnHeaderSelectors

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

Declaration

cs-api-definition
public virtual bool AllowColumnHeaderSelectors { get; set; }

Property Value

bool

AllowFishEye

Gets or sets whether the fish eye functionality is enabled.

Declaration

cs-api-definition
public virtual bool AllowFishEye { get; set; }

Property Value

bool

AllowRowHeaderSelectors

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

Declaration

cs-api-definition
public virtual bool AllowRowHeaderSelectors { get; set; }

Property Value

bool

AllowViewSelector

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

Declaration

cs-api-definition
public virtual bool AllowViewSelector { get; set; }

Property Value

bool

Calendar

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

Declaration

cs-api-definition
[Browsable(false)]
public RadCalendar Calendar { get; }

Property Value

RadCalendar

CellHorizontalSpacing

Gets or sets the horizontal spacing between the calendar cells

Declaration

cs-api-definition
public int CellHorizontalSpacing { get; set; }

Property Value

int

CellMargin

Gets or sets the margin of the view cells

Declaration

cs-api-definition
public Padding CellMargin { get; set; }

Property Value

Padding

CellPadding

Gets or sets the margin of the view cells

Declaration

cs-api-definition
public Padding CellPadding { get; set; }

Property Value

Padding

CellToolTipFormat

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

Declaration

cs-api-definition
public string CellToolTipFormat { get; set; }

Property Value

string

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

Declaration

cs-api-definition
public int CellVerticalSpacing { get; set; }

Property Value

int

Children

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

Declaration

cs-api-definition
public virtual CalendarViewCollection Children { get; }

Property Value

CalendarViewCollection

ColumnHeaderImage

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

Declaration

cs-api-definition
[Bindable(false)]
public Image ColumnHeaderImage { get; set; }

Property Value

Image

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

cs-api-definition
[Bindable(false)]
public string ColumnHeaderText { get; set; }

Property Value

string

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.

Declaration

cs-api-definition
public int Columns { get; set; }

Property Value

int

CurrentCalendar

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

Declaration

cs-api-definition
[Browsable(false)]
public Calendar CurrentCalendar { get; }

Property Value

Calendar

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

Declaration

cs-api-definition
public virtual int HeaderHeight { get; set; }

Property Value

int

HeaderWidth

The Width applied to a Header

Declaration

cs-api-definition
public virtual int HeaderWidth { get; set; }

Property Value

int

IsMultipleView

Gets a value indicating whether the CalendarView has child views.

Declaration

cs-api-definition
public virtual bool IsMultipleView { get; }

Property Value

bool

IsRootView

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

Declaration

cs-api-definition
[Browsable(false)]
public virtual bool IsRootView { get; }

Property Value

bool

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.

Declaration

cs-api-definition
[Browsable(false)]
public int Level { get; }

Property Value

int

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

cs-api-definition
public virtual MonthLayout MonthLayout { get; set; }

Property Value

MonthLayout

MultiViewColumns

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

Declaration

cs-api-definition
public int MultiViewColumns { get; set; }

Property Value

int

MultiViewRows

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

Declaration

cs-api-definition
public int MultiViewRows { get; set; }

Property Value

int

Name

Gets or sets the name of the node.

Declaration

cs-api-definition
public virtual string Name { get; set; }

Property Value

string

NextView

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

Declaration

cs-api-definition
[Browsable(false)]
public virtual CalendarView NextView { get; }

Property Value

CalendarView

Orientation

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

Declaration

cs-api-definition
public Orientation Orientation { get; set; }

Property Value

Orientation

Remarks

MemberDescription
HorizontalRenders the calendar data row after row.
VerticalRenders the calendar data column after column.

Parent

Gets the parent tree node of the current tree node.

Declaration

cs-api-definition
[Browsable(false)]
public virtual CalendarView Parent { get; }

Property Value

CalendarView

PreviousView

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

Declaration

cs-api-definition
[Browsable(false)]
public virtual CalendarView PreviousView { get; }

Property Value

CalendarView

ReadOnly

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

Declaration

cs-api-definition
public virtual bool ReadOnly { get; set; }

Property Value

bool

RootView

Gets the root parent node for this instance.

Declaration

cs-api-definition
[Browsable(false)]
public CalendarView RootView { get; }

Property Value

CalendarView

RowHeaderImage

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

Declaration

cs-api-definition
public Image RowHeaderImage { get; set; }

Property Value

Image

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

cs-api-definition
[Bindable(false)]
public string RowHeaderText { get; set; }

Property Value

string

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.

Rows

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

Declaration

cs-api-definition
public int Rows { get; set; }

Property Value

int

ShowColumnHeaders

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

Declaration

cs-api-definition
public virtual bool ShowColumnHeaders { get; set; }

Property Value

bool

ShowHeader

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

Declaration

cs-api-definition
public virtual bool ShowHeader { get; set; }

Property Value

bool

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

cs-api-definition
public virtual bool ShowOtherMonthsDays { get; set; }

Property Value

bool

ShowRowHeaders

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

Declaration

cs-api-definition
public virtual bool ShowRowHeaders { get; set; }

Property Value

bool

ShowSelector

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

Declaration

cs-api-definition
public virtual bool ShowSelector { get; set; }

Property Value

bool

TitleAlign

Gets or sets the horizontal alignment of the view title.

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

Declaration

cs-api-definition
public virtual ContentAlignment TitleAlign { get; set; }

Property Value

ContentAlignment

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.

TitleFormat

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

Declaration

cs-api-definition
public virtual string TitleFormat { get; set; }

Property Value

string

ViewEndDate

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

Declaration

cs-api-definition
public virtual DateTime ViewEndDate { get; set; }

Property Value

DateTime

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

cs-api-definition
protected virtual DateTime ViewRenderEndDate { get; set; }

Property Value

DateTime

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

cs-api-definition
protected virtual DateTime ViewRenderStartDate { get; set; }

Property Value

DateTime

ViewSelectorImage

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

Declaration

cs-api-definition
[Bindable(false)]
public Image ViewSelectorImage { get; set; }

Property Value

Image

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

cs-api-definition
[Bindable(false)]
public string ViewSelectorText { get; set; }

Property Value

string

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.

ViewStartDate

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

Declaration

cs-api-definition
public virtual DateTime ViewStartDate { get; set; }

Property Value

DateTime

Visible

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

Declaration

cs-api-definition
public bool Visible { get; set; }

Property Value

bool

ZoomFactor

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

Declaration

cs-api-definition
public virtual float ZoomFactor { get; set; }

Property Value

float

Methods

AddViewPeriods(DateTime, int)

Declaration

cs-api-definition
protected virtual DateTime AddViewPeriods(DateTime startDate, int periods)

Parameters

startDate

DateTime

periods

int

Returns

DateTime

CreateView()

Declaration

cs-api-definition
protected virtual CalendarView CreateView()

Returns

CalendarView

CreateView(DateTime)

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

Declaration

cs-api-definition
protected virtual CalendarView CreateView(DateTime date)

Parameters

date

DateTime

DateTime object that is used to create the CalendarView.

Returns

CalendarView

The created CalendarView object.

Dispose()

Declaration

cs-api-definition
public void Dispose()

EffectiveVisibleDate()

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

Declaration

cs-api-definition
protected virtual DateTime EffectiveVisibleDate()

Returns

DateTime

DateTime object that is used by the CalendarView to initialize.

EnsureChildViews()

Ensures that the child views collection is created.

Declaration

cs-api-definition
protected virtual void EnsureChildViews()

EnsureRenderSettings()

Verifies CalendarView settings required for correct presentation of calendrical information.

Declaration

cs-api-definition
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

cs-api-definition
protected virtual DateTime GetNextViewDate()

Returns

DateTime

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

cs-api-definition
protected virtual DateTime GetPreviousViewDate()

Returns

DateTime

The DateTime object

HandleDownKey(Keys)

handles the down arrow key.

Declaration

cs-api-definition
protected virtual void HandleDownKey(Keys keys)

Parameters

keys

Keys

The key data to be processed.

HandleEndKey(Keys)

handles the End key.

Declaration

cs-api-definition
protected virtual void HandleEndKey(Keys keys)

Parameters

keys

Keys

The key data to be processed.

HandleHomeKey(Keys)

handles the Home key.

Declaration

cs-api-definition
protected virtual void HandleHomeKey(Keys keys)

Parameters

keys

Keys

The key data to be processed.

HandleKeyDown(Keys)

handles key events that require processing from CalendarView.

Declaration

cs-api-definition
protected virtual bool HandleKeyDown(Keys keys)

Parameters

keys

Keys

The key data to be processed.

Returns

bool

HandleLeftKey(Keys)

handles the left arrow key.

Declaration

cs-api-definition
protected virtual void HandleLeftKey(Keys keys)

Parameters

keys

Keys

The key data to be processed.

HandlePageDownKey(Keys)

handles the page down key.

Declaration

cs-api-definition
protected virtual void HandlePageDownKey(Keys keys)

Parameters

keys

Keys

The key data to be processed.

HandlePageUpKey(Keys)

handles the page up key.

Declaration

cs-api-definition
protected virtual void HandlePageUpKey(Keys keys)

Parameters

keys

Keys

The key data to be processed.

HandleRightKey(Keys)

handles the right arrow key.

Declaration

cs-api-definition
protected virtual void HandleRightKey(Keys keys)

Parameters

keys

Keys

The key data to be processed.

HandleUpKey(Keys)

handles the up arrow key.

Declaration

cs-api-definition
protected virtual void HandleUpKey(Keys keys)

Parameters

keys

Keys

The key data to be processed.

IsDateInView(DateTime)

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

Declaration

cs-api-definition
public bool IsDateInView(DateTime date)

Parameters

date

DateTime

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.

OnNotifyPropertyChanged(PropertyChangedEventArgs)

Declaration

cs-api-definition
protected virtual void OnNotifyPropertyChanged(PropertyChangedEventArgs e)

Parameters

e

PropertyChangedEventArgs

OnNotifyPropertyChanged(string)

Raises the PropertyChanged event

Declaration

cs-api-definition
protected virtual void OnNotifyPropertyChanged(string propertyName)

Parameters

propertyName

string

The name of the property

Select(DateTime)

Adds the specified date to the SelectedDates collection of RadCalendar.

Declaration

cs-api-definition
public virtual void Select(DateTime date)

Parameters

date

DateTime

The DateTime object to add.

SelectRange(DateTime, DateTime)

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

Declaration

cs-api-definition
public virtual void SelectRange(DateTime startDate, DateTime endDate)

Parameters

startDate

DateTime

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

endDate

DateTime

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

cs-api-definition
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

cs-api-definition
protected virtual void SetDateRange()

ToggleSelection(Keys)

Toogles the date selection (Enter key).

Declaration

cs-api-definition
protected virtual void ToggleSelection(Keys keys)

Parameters

keys

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

cs-api-definition
[Browsable(false)]
public event PropertyChangedEventHandler PropertyChanged

Event Value

PropertyChangedEventHandler

Implements INotifyPropertyChanged.PropertyChanged