[]
Represents a GcDropDownCalendar control that enables a user to select a date by using a visual calendar display.
[StyleTypedProperty(Property = "CalendarButtonStyle", StyleTargetType = typeof(CalendarButton))]
[StyleTypedProperty(Property = "CalendarDayButtonStyle", StyleTargetType = typeof(CalendarDayButton))]
[StyleTypedProperty(Property = "CalendarHeaderButtonStyle", StyleTargetType = typeof(CalendarHeaderButton))]
[StyleTypedProperty(Property = "CalendarItemStyle", StyleTargetType = typeof(CalendarItem))]
[StyleTypedProperty(Property = "WeekTitleStyle", StyleTargetType = typeof(WeekTitle))]
[StyleTypedProperty(Property = "WeekNumberStyle", StyleTargetType = typeof(WeekNumber))]
[TemplateVisualState(Name = "Disabled", GroupName = "CommonStates")]
[TemplateVisualState(Name = "Normal", GroupName = "CommonStates")]
public class GcDropDownCalendar : ControlBase, IAnimatable, IFrameworkInputElement, IInputElement, IQueryAmbient, ISupportInitialize
<StyleTypedProperty(Property:="CalendarButtonStyle", StyleTargetType:=GetType(CalendarButton))>
<StyleTypedProperty(Property:="CalendarDayButtonStyle", StyleTargetType:=GetType(CalendarDayButton))>
<StyleTypedProperty(Property:="CalendarHeaderButtonStyle", StyleTargetType:=GetType(CalendarHeaderButton))>
<StyleTypedProperty(Property:="CalendarItemStyle", StyleTargetType:=GetType(CalendarItem))>
<StyleTypedProperty(Property:="WeekTitleStyle", StyleTargetType:=GetType(WeekTitle))>
<StyleTypedProperty(Property:="WeekNumberStyle", StyleTargetType:=GetType(WeekNumber))>
<TemplateVisualState(Name:="Disabled", GroupName:="CommonStates")>
<TemplateVisualState(Name:="Normal", GroupName:="CommonStates")>
Public Class GcDropDownCalendar
Inherits ControlBase
Implements IAnimatable, IFrameworkInputElement, IInputElement, IQueryAmbient, ISupportInitialize
A GcDropDownCalendar control can be used on its own, or as a drop-down part of a GrapeCity.Windows.InputMan.GcDateTime control. For more information, see GrapeCity.Windows.InputMan.GcDateTime.
The following table provides information about tasks that are typically associated with the GcDropDownCalendar.
Task | Implementation |
---|---|
Have the GcDropDownCalendar display a month, an entire year, or a decade. | Set the DisplayMode property to GrapeCity.Windows.InputMan.CalendarMode.Month, GrapeCity.Windows.InputMan.CalendarMode.Year, or GrapeCity.Windows.InputMan.CalendarMode.Decade. |
Specify whether the user can select a date, a range of dates, or multiple ranges of dates. | Use the SelectionMode. |
Specify dates that cannot be selected. | Use the BlackoutDates property. |
Specify the range of dates that the GcDropDownCalendar has. | Use the MinDate and MaxDate properties. |
Specify whether the current date is highlighted. | Use the IsTodayHighlighted property. By default, IsTodayHighlighted is true. |
Supported VisualState list:
VisualStateGroup Name |
VisualState Name |
Description |
---|---|---|
CommonStates |
Normal |
Represents the visual appearance when control is in normal state. |
CommonStates |
Disabled |
|
ValidationStates |
Valid |
Represents the visual appearance when System.Windows.Controls.Validation.GetHasError(System.Windows.DependencyObject) returns false. |
ValidationStates |
InvalidFocused |
Represents the visual appearance when System.Windows.Controls.Validation.GetHasError(System.Windows.DependencyObject) returns true and IsKeyboardFocused is true. |
ValidationStates |
InvalidUnfocused |
Represents the visual appearance when System.Windows.Controls.Validation.GetHasError(System.Windows.DependencyObject) returns true and IsKeyboardFocused is false. |
Name | Description |
---|---|
GcDropDownCalendar() | Initializes a new instance of the GcDropDownCalendar class. |
Name | Description |
---|---|
AllowSelectionProperty | Identifies the AllowSelection dependency property. |
CalendarButtonStyleProperty | Identifies the CalendarButtonStyle dependency property. |
CalendarDayButtonStyleProperty | Identifies the CalendarDayButtonStyle dependency property. |
CalendarDayButtonStyleSelectorProperty | Identifies the GrapeCity.Windows.InputMan.GcDropDownCalendar.CalendarDayButtonStyleSelector dependency property. |
CalendarHeaderButtonStyleProperty | Identifies the CalendarHeaderButtonStyle dependency property. |
CalendarItemStyleProperty | Identifies the CalendarItemStyle dependency property. |
CalendarSelectionBackgroundProperty | Identifies the CalendarSelectionBackground dependency property. |
CalendarYearProperty | Identifies the CalendarYear dependency property. |
ClickDateEvent | Identifies the ClickDate routed event. |
DisplayModeChangedEvent | Identifies the DisplayModeChanged routed event. |
DisplayModeProperty | Identifies the DisplayMode dependency property. |
DoubleClickDateEvent | Identifies the DoubleClickDate routed event. |
EmptyRowProperty | Identifies the EmptyRow dependency property. |
EndDisplayModeProperty | Identifies the EndDisplayMode dependency property. |
FirstDayOfWeekProperty | Identifies the FirstDayOfWeek dependency property. |
FirstFiscalMonthProperty | Identifies the FirstFiscalMonth dependency property. |
FocusedDateChangedEvent | Identifies the FocusedDateChanged routed event. |
FocusedDateProperty | Identifies the FocusedDate dependency property. |
HolidaySettingProperty | Identifies the HolidaySetting dependency property. |
InnerMarginProperty | Identifies the InnerMargin dependency property. |
IsTodayHighlightedProperty | Identifies the IsTodayHighlighted dependency property. |
MaxDateProperty | Identifies the MaxDate dependency property. |
MinDateProperty | Identifies the MinDate dependency property. |
MonthFormatProperty | Identifies the MonthFormat dependency property. |
ScrolledEvent | Identifies the Scrolled routed event. |
SelectedDateProperty | Identifies the SelectedDate dependency property. |
SelectedDatesChangedEvent | Identifies the SelectedDatesChanged routed event. |
SelectionModeProperty | Identifies the SelectionMode dependency property. |
ShowContextMenuProperty | Identifies the ShowContextMenu dependency property. |
ShowTrailingProperty | Identifies the ShowTrailing dependency property. |
StartDisplayModeProperty | Identifies the StartDisplayMode dependency property. |
TodayBackgroundProperty | Identifies the TodayBackground dependency property. |
TodayForegroundProperty | Identifies the TodayForeground dependency property. |
WeekNumberStyleProperty | Identifies the WeekNumberStyle dependency property. |
WeekTitleStyleProperty | Identifies the WeekTitleStyle dependency property. |
WeekTitleStyleSelectorProperty | Identifies the GrapeCity.Windows.InputMan.GcDropDownCalendar.WeekTitleStyleSelector dependency property. |
YearFormatProperty | Identifies the YearFormat dependency property. |
YearMonthFormatProperty | Identifies the YearMonthFormat dependency property. |
Name | Description |
---|---|
AllowSelection | Gets or sets the days for the day type allowed to select. This is a dependency property. |
BlackoutDates | Gets a collection of dates that are marked as not selectable. |
CalendarButtonStyle | Gets or sets the Style that is applied to the GrapeCity.Windows.InputMan.Primitives.CalendarButton in GcDropDownCalendar. This is a dependency property. |
CalendarDayButtonStyle | Gets or sets the Style that is applied to the GrapeCity.Windows.InputMan.Primitives.CalendarDayButton in GcDropDownCalendar. This is a dependency property. |
CalendarDayButtonStyleSelector | Gets or sets the CalendarDayButtonStyleSelector, use it to change appearance of CalendarDayButton according to condition. This is a dependency property. |
CalendarHeaderButtonStyle | Gets or sets the Style that is applied to the GrapeCity.Windows.InputMan.Primitives.CalendarHeaderButton in GcDropDownCalendar. This is a dependency property. |
CalendarItemStyle | Gets or sets the Style that is applied to the GrapeCity.Windows.InputMan.Primitives.CalendarItem in GcDropDownCalendar. This is a dependency property. |
CalendarSelectionBackground | Gets or sets a brush that describes the background of selected button. This is a dependency property. |
CalendarYear | Gets or sets the calendar year to show fiscal year or normal year. This is a dependency property. |
DisplayMode | Gets or sets a value that indicates whether the calendar displays a month, year, or decade. This is a dependency property. |
EmptyRow | Gets or sets how to show the empty week rows in the GcDropDownCalendar. This is a dependency property. |
EndDisplayMode | Gets or sets the end display mode for the available display mode range. This is a dependency property. |
FirstDayOfWeek | Gets or sets the day that is considered the beginning of the week. This is a dependency property. |
FirstFiscalMonth | Gets or sets the month that is considered the beginning of the fiscal year. This is a dependency property. |
FocusedDate | Gets or sets the day that with focus. This is a dependency property. |
HolidaySetting | Gets or sets the holiday settings for the control. This is a dependency property. |
InnerMargin | Gets or sets the margin of the inner calendar view. This is a dependency property. |
IsTodayHighlighted | Gets or sets a value that indicates whether the current date is highlighted. This is a dependency property. |
MaxDate | Gets or sets the maximum date that can be shown in the control. This is a dependency property. |
MinDate | Gets or sets the minimum date that can be shown in the control. This is a dependency property. |
MonthFormat | Gets or sets the format of month. This is a dependency property. |
SelectedDate | Gets or sets the selected date, the first date in the selection or null if the selection is empty. This is a dependency property. |
SelectedDates | Gets a collection of the selected dates. |
SelectionMode | Gets or sets a value that indicates what kind of selections are allowed. This is a dependency property. |
ShowContextMenu | Gets or sets a value indicating whether the context menu could be shown. This is a dependency property. |
ShowTrailing | Gets or sets a value indicating whether the trailing days could be shown or not. This is a dependency property. |
StartDisplayMode | Gets or sets the start display mode for the available display mode range. This is a dependency property. |
TodayBackground | Gets or sets a brush that describes the background of today button. This is a dependency property. |
TodayForeground | Gets or sets a brush that describes the foreground of today button. This is a dependency property. |
WeekNumberStyle | Gets or sets the Style that is applied to the GrapeCity.Windows.InputMan.Primitives.WeekNumber in GcDropDownCalendar. This is a dependency property. |
WeekTitleStyle | Gets or sets the Style that is applied to the GrapeCity.Windows.InputMan.Primitives.WeekTitle in GcDropDownCalendar. This is a dependency property. |
WeekTitleStyleSelector | Gets or sets the WeekTitleStyleSelector, use it to change appearance of WeekTitle according to condition. This is a dependency property. |
YearFormat | Gets or sets the format of year. This is a dependency property. |
YearMonthFormat | Gets or sets the year month format for formatted header text. This is a dependency property. |
Name | Description |
---|---|
BeginInit() | Invoked when the initialization process for this element starts. |
EndInit() | Indicates that the initialization process for the element is complete. |
GetDatesInView() | Get all the dates in view. |
GetDatesInView(PickDayType) | Get the dates of the given type in view. |
OnClickDate(ClickDateEventArgs) | Called when mouse clicked on the button of calendar, to raise the ClickDate event. |
OnDisplayModeChanged(CalendarModeChangedEventArgs) | Called when the DisplayMode property changed, to raise the DisplayModeChanged event. |
OnDoubleClickDate(ClickDateEventArgs) | Called when mouse double clicked on the button of calendar, to raise the DoubleClickDate event. |
OnFocusedDateChanged(CalendarDateEventArgs) | Called when the FocusedDate property changed, to raise the FocusedDateChanged event. |
OnGotKeyboardFocus(KeyboardFocusChangedEventArgs) | Invoked when an unhandled GotKeyboardFocusEvent attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. |
OnKeyDown(KeyEventArgs) | Invoked when an unhandled System.Windows.Input.Keyboard.KeyDown attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. |
OnLostMouseCapture(MouseEventArgs) | Invoked when an unhandled LostMouseCapture event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event. |
OnScrolled(RoutedEventArgs) | Called when navigating to the previous or next dates, to raise the Scrolled event. |
OnSelectionChanged(SelectionChangedEventArgs) | Raises the SelectedDatesChanged routed event. |
Scroll(int) | Scrolls the specified offset. |
ZoomIn() | The control zoom in. |
ZoomOut() | The control zoom out. |
Name | Description |
---|---|
ClickDate | Occurs when mouse clicked on the button of calendar. |
DisplayModeChanged | Occurs when the DisplayMode property changed. |
DoubleClickDate | Occurs when mouse double clicked on the button of calendar. |
FocusedDateChanged | Called when the FocusedDate property changed, to raise the FocusedDateChanged event. |
Scrolled | Occurs when the calendar scrolled. |
SelectedDatesChanged | Occurs when the selection of GcDropDownCalendar has changed. |