C# Class WinRTXamlToolkit.Controls.Calendar

Inheritance: Windows.UI.Xaml.Controls.Control
Exibir arquivo Open project: xyzzer/WinRTXamlToolkit Class Usage Examples

Public Properties

Property Type Description
CalendarButtonStyleProperty Windows.UI.Xaml.DependencyProperty
CalendarDayButtonStyleProperty Windows.UI.Xaml.DependencyProperty
CalendarItemStyleProperty Windows.UI.Xaml.DependencyProperty
DisplayDateEndProperty Windows.UI.Xaml.DependencyProperty
DisplayDateProperty Windows.UI.Xaml.DependencyProperty
DisplayDateStartProperty Windows.UI.Xaml.DependencyProperty
DisplayModeProperty Windows.UI.Xaml.DependencyProperty
FirstDayOfWeekProperty Windows.UI.Xaml.DependencyProperty
IsTodayHighlightedProperty Windows.UI.Xaml.DependencyProperty
SelectedDateProperty Windows.UI.Xaml.DependencyProperty
SelectionModeProperty Windows.UI.Xaml.DependencyProperty

Private Properties

Property Type Description
AddSelection void
Calendar_GotFocus void
Calendar_KeyDown void
Calendar_KeyUp void
Calendar_LostFocus void
Calendar_PointerReleased void
Calendar_SizeChanged void
EnsureCalendarButtonStyle void
EnsureDayButtonStyle void
EnsureMonthStyle void
FindDayButtonFromDay WinRTXamlToolkit.Controls.Primitives.CalendarDayButton
HighlightDays void
IsSelectionChanged bool
IsValidDateSelection bool
IsValidDisplayMode bool
IsValidFirstDayOfWeek bool
IsValidKeyboardSelection bool
IsValidSelectionMode bool
OnCalendarButtonStyleChanged void
OnCalendarDayButtonStyleChanged void
OnCalendarItemStyleChanged void
OnDayButtonMouseUp void
OnDayClick void
OnDisplayDate void
OnDisplayDateChanged void
OnDisplayDateEndChanged void
OnDisplayDateStartChanged void
OnDisplayModeChanged void
OnDisplayModePropertyChanged void
OnFirstDayOfWeekChanged void
OnHeaderClick void
OnIsEnabledChanged void
OnIsTodayHighlightedChanged void
OnMonthClick void
OnNextClick void
OnPreviousClick void
OnSelectedDateChanged void
OnSelectedDatesCollectionChanged void
OnSelectedMonthChanged void
OnSelectedYearChanged void
OnSelectionModeChanged void
ProcessCalendarKey bool
ProcessDownKey void
ProcessEndKey void
ProcessEnterKey bool
ProcessHomeKey void
ProcessLeftKey void
ProcessPageDownKey void
ProcessPageUpKey void
ProcessRightKey void
ProcessSelection void
ProcessShiftKeyUp void
ProcessUpKey void
ResetStates void
SelectedDateMax DateTime?
SelectedDateMin DateTime?
SortHoverIndexes void
UnHighlightDays void
UpdateDisplayDate void
UpdateMonths void

Public Methods

Method Description
Calendar ( ) : System

Initializes a new instance of the T:WinRTXamlToolkit.Controls.Calendar class.

ReplaceSelectedDatesCollection ( ObservableCollection selectedDates ) : void
ToString ( ) : string

Provides a text representation of the selected date.

Protected Methods

Method Description
OnApplyTemplate ( ) : void

Builds the visual tree for the T:WinRTXamlToolkit.Controls.Calendar when a new template is applied.

OnCreateAutomationPeer ( ) : AutomationPeer

Returns a T:WinRTXamlToolkit.Automation.Peers.CalendarAutomationPeer for use by the Silverlight automation infrastructure.

This method creates a new CalendarAutomationPeer instance if one has not been created for the control instance; otherwise, it returns the CalendarAutomationPeer previously created.

Classes that participate in the Silverlight automation infrastructure must implement this method to return a class-specific derived class of AutomationPeer that reports information for automation behavior.

OnPointerWheelChanged ( PointerRoutedEventArgs e ) : void

Default mouse wheel handler for the calendar control.

Private Methods

Method Description
AddSelection ( ) : void

This method adds the days that were selected by Keyboard to the SelectedDays Collection.

Calendar_GotFocus ( object sender, RoutedEventArgs e ) : void

Inherited code: Requires comment.

Calendar_KeyDown ( object sender, KeyRoutedEventArgs e ) : void

Inherited code: Requires comment.

Calendar_KeyUp ( object sender, KeyRoutedEventArgs e ) : void

Inherited code: Requires comment.

Calendar_LostFocus ( object sender, RoutedEventArgs e ) : void

Inherited code: Requires comment.

Calendar_PointerReleased ( object sender, PointerRoutedEventArgs e ) : void

Inherited code: Requires comment.

Calendar_SizeChanged ( object sender, SizeChangedEventArgs e ) : void

Inherited code: Requires comment.

EnsureCalendarButtonStyle ( CalendarButton calendarButton, Style oldCalendarButtonStyle, Style newCalendarButtonStyle ) : void

Inherited code: Requires comment.

EnsureDayButtonStyle ( CalendarDayButton dayButton, Style oldDayButtonStyle, Style newDayButtonStyle ) : void

Inherited code: Requires comment.

EnsureMonthStyle ( CalendarItem month, Style oldMonthStyle, Style newMonthStyle ) : void

Inherited code: Requires comment.

FindDayButtonFromDay ( DateTime day ) : CalendarDayButton

Inherited code: Requires comment.

HighlightDays ( ) : void

This method highlights the days in MultiSelection mode without adding them to the SelectedDates collection.

IsSelectionChanged ( SelectionChangedEventArgs e ) : bool

Inherited code: Requires comment.

IsValidDateSelection ( Calendar cal, object value ) : bool

Inherited code: Requires comment.

IsValidDisplayMode ( CalendarMode mode ) : bool

Inherited code: Requires comment.

IsValidFirstDayOfWeek ( object value ) : bool

Inherited code: Requires comment.

IsValidKeyboardSelection ( Calendar cal, object value ) : bool

Inherited code: Requires comment.

IsValidSelectionMode ( object value ) : bool

Inherited code: Requires comment.

OnCalendarButtonStyleChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Inherited code: Requires comment.

OnCalendarDayButtonStyleChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Inherited code: Requires comment.

OnCalendarItemStyleChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Inherited code: Requires comment.

OnDayButtonMouseUp ( PointerRoutedEventArgs e ) : void

Inherited code: Requires comment.

OnDayClick ( DateTime selectedDate ) : void

If the day is a trailing day, Update the DisplayDate.

OnDisplayDate ( CalendarDateChangedEventArgs e ) : void

Inherited code: Requires comment.

OnDisplayDateChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

DisplayDateProperty property changed handler.

OnDisplayDateEndChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

DisplayDateEndProperty property changed handler.

OnDisplayDateStartChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

DisplayDateStartProperty property changed handler.

OnDisplayModeChanged ( WinRTXamlToolkit.Controls.CalendarModeChangedEventArgs args ) : void

Inherited code: Requires comment.

OnDisplayModePropertyChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

DisplayModeProperty property changed handler.

OnFirstDayOfWeekChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

FirstDayOfWeekProperty property changed handler.

OnHeaderClick ( ) : void

Inherited code: Requires comment.

OnIsEnabledChanged ( object sender, DependencyPropertyChangedEventArgs e ) : void

Called when the IsEnabled property changes.

OnIsTodayHighlightedChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

IsTodayHighlightedProperty property changed handler.

OnMonthClick ( ) : void

Inherited code: Requires comment.

OnNextClick ( ) : void

Inherited code: Requires comment.

OnPreviousClick ( ) : void

Inherited code: Requires comment.

OnSelectedDateChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

SelectedDateProperty property changed handler.

OnSelectedDatesCollectionChanged ( SelectionChangedEventArgs e ) : void

Inherited code: Requires comment.

OnSelectedMonthChanged ( DateTime selectedMonth ) : void

Inherited code: Requires comment.

OnSelectedYearChanged ( DateTime selectedYear ) : void

Inherited code: Requires comment.

OnSelectionModeChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Inherited code: Requires comment.

ProcessCalendarKey ( KeyRoutedEventArgs e ) : bool

Inherited code: Requires comment.

ProcessDownKey ( bool ctrl, bool shift ) : void

Inherited code: Requires comment.

ProcessEndKey ( bool shift ) : void

Inherited code: Requires comment.

ProcessEnterKey ( ) : bool

Inherited code: Requires comment.

ProcessHomeKey ( bool shift ) : void

Inherited code: Requires comment.

ProcessLeftKey ( bool shift ) : void

Inherited code: Requires comment.

ProcessPageDownKey ( bool shift ) : void

Inherited code: Requires comment.

ProcessPageUpKey ( bool shift ) : void

Inherited code: Requires comment.

ProcessRightKey ( bool shift ) : void

Inherited code: Requires comment.

ProcessSelection ( bool shift, DateTime lastSelectedDate, int index ) : void

Inherited code: Requires comment.

ProcessShiftKeyUp ( ) : void

Inherited code: Requires comment.

ProcessUpKey ( bool ctrl, bool shift ) : void

Inherited code: Requires comment.

ResetStates ( ) : void

Inherited code: Requires comment.

SelectedDateMax ( Calendar cal ) : DateTime?

Inherited code: Requires comment.

SelectedDateMin ( Calendar cal ) : DateTime?

Inherited code: Requires comment.

SortHoverIndexes ( int &startIndex, int &endIndex ) : void

Inherited code: Requires comment.

UnHighlightDays ( ) : void

This method un-highlights the days that were hovered over but not added to the SelectedDates collection or un-highlighted the previously selected days in SingleRange Mode.

UpdateDisplayDate ( Calendar c, DateTime addedDate, DateTime removedDate ) : void

Updates the display date.

UpdateMonths ( ) : void

Inherited code: Requires comment.

Method Details

Calendar() public method

Initializes a new instance of the T:WinRTXamlToolkit.Controls.Calendar class.
public Calendar ( ) : System
return System

OnApplyTemplate() protected method

Builds the visual tree for the T:WinRTXamlToolkit.Controls.Calendar when a new template is applied.
protected OnApplyTemplate ( ) : void
return void

OnCreateAutomationPeer() protected method

Returns a T:WinRTXamlToolkit.Automation.Peers.CalendarAutomationPeer for use by the Silverlight automation infrastructure.

This method creates a new CalendarAutomationPeer instance if one has not been created for the control instance; otherwise, it returns the CalendarAutomationPeer previously created.

Classes that participate in the Silverlight automation infrastructure must implement this method to return a class-specific derived class of AutomationPeer that reports information for automation behavior.

protected OnCreateAutomationPeer ( ) : AutomationPeer
return Windows.UI.Xaml.Automation.Peers.AutomationPeer

OnPointerWheelChanged() protected method

Default mouse wheel handler for the calendar control.
protected OnPointerWheelChanged ( PointerRoutedEventArgs e ) : void
e Windows.UI.Xaml.Input.PointerRoutedEventArgs Mouse wheel event args.
return void

ReplaceSelectedDatesCollection() public method

public ReplaceSelectedDatesCollection ( ObservableCollection selectedDates ) : void
selectedDates ObservableCollection
return void

ToString() public method

Provides a text representation of the selected date.
public ToString ( ) : string
return string

Property Details

CalendarButtonStyleProperty public_oe static_oe property

Identifies the P:WinRTXamlToolkit.Controls.Calendar.CalendarButtonStyle dependency property.
public static DependencyProperty,Windows.UI.Xaml CalendarButtonStyleProperty
return Windows.UI.Xaml.DependencyProperty

CalendarDayButtonStyleProperty public_oe static_oe property

Identifies the P:WinRTXamlToolkit.Controls.Calendar.CalendarDayButtonStyle dependency property.
The identifier for the P:WinRTXamlToolkit.Controls.Calendar.CalendarDayButtonStyle dependency property.
public static DependencyProperty,Windows.UI.Xaml CalendarDayButtonStyleProperty
return Windows.UI.Xaml.DependencyProperty

CalendarItemStyleProperty public_oe static_oe property

Identifies the P:WinRTXamlToolkit.Controls.Calendar.CalendarItemStyle dependency property.
public static DependencyProperty,Windows.UI.Xaml CalendarItemStyleProperty
return Windows.UI.Xaml.DependencyProperty

DisplayDateEndProperty public_oe static_oe property

Identifies the P:WinRTXamlToolkit.Controls.Calendar.DisplayDateEnd dependency property.
public static DependencyProperty,Windows.UI.Xaml DisplayDateEndProperty
return Windows.UI.Xaml.DependencyProperty

DisplayDateProperty public_oe static_oe property

Identifies the P:WinRTXamlToolkit.Controls.Calendar.DisplayDate dependency property.
public static DependencyProperty,Windows.UI.Xaml DisplayDateProperty
return Windows.UI.Xaml.DependencyProperty

DisplayDateStartProperty public_oe static_oe property

Identifies the P:WinRTXamlToolkit.Controls.Calendar.DisplayDateStart dependency property.
public static DependencyProperty,Windows.UI.Xaml DisplayDateStartProperty
return Windows.UI.Xaml.DependencyProperty

DisplayModeProperty public_oe static_oe property

Identifies the P:WinRTXamlToolkit.Controls.Calendar.DisplayMode dependency property.
public static DependencyProperty,Windows.UI.Xaml DisplayModeProperty
return Windows.UI.Xaml.DependencyProperty

FirstDayOfWeekProperty public_oe static_oe property

Identifies the P:WinRTXamlToolkit.Controls.Calendar.FirstDayOfWeek dependency property.
public static DependencyProperty,Windows.UI.Xaml FirstDayOfWeekProperty
return Windows.UI.Xaml.DependencyProperty

IsTodayHighlightedProperty public_oe static_oe property

Identifies the P:WinRTXamlToolkit.Controls.Calendar.IsTodayHighlighted dependency property.
public static DependencyProperty,Windows.UI.Xaml IsTodayHighlightedProperty
return Windows.UI.Xaml.DependencyProperty

SelectedDateProperty public_oe static_oe property

Identifies the P:WinRTXamlToolkit.Controls.Calendar.SelectedDate dependency property.
public static DependencyProperty,Windows.UI.Xaml SelectedDateProperty
return Windows.UI.Xaml.DependencyProperty

SelectionModeProperty public_oe static_oe property

Identifies the P:WinRTXamlToolkit.Controls.Calendar.SelectionMode dependency property.
public static DependencyProperty,Windows.UI.Xaml SelectionModeProperty
return Windows.UI.Xaml.DependencyProperty