Gets or sets the date to display.
Assembly: PresentationFramework (in PresentationFramework.dll)
The DisplayMode properties specify what the calendar displays and what has focus within the calendar. The user can change the SelectedDate only when DisplayMode is set to Month, but the user might change the when the Calendar is in Year and Decade mode. The following table describes how the mode changes the .and
changes when the user navigates to a different month.
The month ofchanges when the user clicks or navigates to a different month.
The year ofchanges when the user clicks or navigates to another year.
The following code sets up a Calendar with a particular range of displayable dates, and sets the currently selected and displayed date.
' Create a Calendar that displays 1/10/2009 ' through 4/18/2009. Dim basicCalendar As New Calendar() basicCalendar.DisplayDateStart = New DateTime(2009, 1, 10) basicCalendar.DisplayDateEnd = New DateTime(2009, 4, 18) basicCalendar.DisplayDate = New DateTime(2009, 3, 15) basicCalendar.SelectedDate = New DateTime(2009, 2, 15) ' root is a Panel that is defined elswhere. root.Children.Add(basicCalendar)
Available since 4.0
Available since 2.0