C# 클래스 Microsoft.Samples.KMoore.WPFSamples.DateControls.DatePicker

상속: System.Windows.Controls.Control
파일 보기 프로젝트 열기: daszat/zetbox

공개 프로퍼티들

프로퍼티 타입 설명
CanEditProperty System.Windows.DependencyProperty
DateConverterProperty System.Windows.DependencyProperty
DropDownButtonStyleProperty System.Windows.DependencyProperty
DropDownClosedEvent System.Windows.RoutedEvent
DropDownOpenedEvent System.Windows.RoutedEvent
InvalidEntryEvent System.Windows.RoutedEvent
IsDropDownOpenProperty System.Windows.DependencyProperty
IsReadOnlyProperty System.Windows.DependencyProperty
IsValidProperty System.Windows.DependencyProperty
MaxDateProperty System.Windows.DependencyProperty
MinDateProperty System.Windows.DependencyProperty
MonthCalendarStyleProperty System.Windows.DependencyProperty
NullValueTextProperty System.Windows.DependencyProperty
TextProperty System.Windows.DependencyProperty
ValueChangedEvent System.Windows.RoutedEvent
ValueProperty System.Windows.DependencyProperty

Private Properties

프로퍼티 타입 설명
AttachToVisualTree void
CoerceIsDropDownOpen object
CoerceMaxDate object
CoerceValue object
DatePicker System
DetachFromVisualTree void
DoFormat string
DoFormat string
DoParse bool
GetFlag bool
IsFocusable bool
KeyDownHandler void
KeyDownHandler void
KeyboardToggleDropDown void
OnCanEditChanged void
OnContextMenuClose void
OnContextMenuOpen void
OnDateConverterChanged void
OnDateSelectionChanged void
OnDropDownButtonStyleChanged void
OnEditableTextBoxKeyDown void
OnEditableTextBoxLostFocus void
OnEditableTextBoxTextChanged void
OnIsDropDownOpenChanged void
OnMaxDateChanged void
OnMinDateChanged void
OnMonthCalendarCommandPreviewExecuted void
OnMonthCalendarVisibleMonthChanged void
OnMouseButtonDown void
OnNullValueTextChanged void
OnValueChanged void
OpenOnLoad void
RefreshDropDownButtonStyle void
SelectFocusableDate void
SetFlag void
UpdateEditableTextBox void

공개 메소드들

메소드 설명
OnApplyTemplate ( ) : void

Called when the Template's tree has been generated

ToString ( ) : string

Returns a string representation for this control. "...DatePicker, Value:06/02/2006"

보호된 메소드들

메소드 설명
OnDropDownClosed ( RoutedEventArgs e ) : void

Raise DropDownClosed event

OnDropDownOpened ( RoutedEventArgs e ) : void

Raise DropDownOpened event

OnGotKeyboardFocus ( System.Windows.Input.KeyboardFocusChangedEventArgs e ) : void

Called when this element gets focus.

OnInvalidEntry ( InvalidEntryEventArgs e ) : void

This event is invoked when datepicker can't parse the input string correctly

OnLostMouseCapture ( System.Windows.Input.MouseEventArgs e ) : void

Close the dropdown content if DatePicker lost the mouse capture

OnPreviewMouseLeftButtonDown ( System.Windows.Input.MouseButtonEventArgs e ) : void

When datepicker is editable, clicks the entry box should close the datepicker..

OnValueChanged ( RoutedPropertyChangedEventArgs e ) : void

This method is invoked when the Value property changes.

비공개 메소드들

메소드 설명
AttachToVisualTree ( ) : void

Detaches the EditableTextBox, MonthCalendar from old child tree and attaches them to a new one

CoerceIsDropDownOpen ( DependencyObject d, object value ) : object

Coerce IsDropDownOpen with IsLoaded, so set IsDropDownOpen to true before UI ready can work

CoerceMaxDate ( DependencyObject d, object value ) : object
CoerceValue ( DependencyObject d, object value ) : object
DatePicker ( ) : System

Static Constructor

DetachFromVisualTree ( ) : void

Clear the event, and detach our current EditableTextBox from ComboBox

DoFormat ( ) : string

Format Value property to a formatted string

DoFormat ( System.DateTime date ) : string
DoParse ( string text ) : bool

Parse the input string, if the input string is a valid date, return the Date, else return null

If the input entry equals NullValueText, Value will be set to null If the input entry is a valid date, Value will be set to the input date If the input entry isn't a valid date, InvalidEntry event will be fired, Value will still keep the old value (don't set to null)

GetFlag ( Flags flag ) : bool
IsFocusable ( FrameworkElement fe ) : bool

True if the element can be focused

KeyDownHandler ( System.Windows.Input.KeyEventArgs e ) : void
KeyDownHandler ( object sender, System.Windows.Input.KeyEventArgs e ) : void

Called when a key event occurs.

KeyboardToggleDropDown ( bool openDropDown, bool commitSelection ) : void

Close the dropdown and commit the selection if requested. Make sure to set the selection after the dropdown has closed Don't trigger any unnecessary navigation as a result of changing the selection.

OnCanEditChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnContextMenuClose ( object sender, System.Windows.Controls.ContextMenuEventArgs e ) : void
OnContextMenuOpen ( object sender, System.Windows.Controls.ContextMenuEventArgs e ) : void
OnDateConverterChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnDateSelectionChanged ( object sender, DateSelectionChangedEventArgs e ) : void
OnDropDownButtonStyleChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnEditableTextBoxKeyDown ( object sender, System.Windows.Input.KeyEventArgs e ) : void

If Key.Enter is pressed, DatePicker will parse the Text no matter it changed or not

OnEditableTextBoxLostFocus ( object sender, System.Windows.Input.KeyboardFocusChangedEventArgs e ) : void

If EditableTextBoxSite loses focus and Text has been changed, DatePicker will parse Text

OnEditableTextBoxTextChanged ( object sender, System.Windows.Controls.TextChangedEventArgs e ) : void

If Text has been changed, the flag Flags.IsTextChanged will be set to true, so DatePicker can decide to parse the Text or not

OnIsDropDownOpenChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnMaxDateChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnMinDateChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnMonthCalendarCommandPreviewExecuted ( object sender, System.Windows.Input.ExecutedRoutedEventArgs args ) : void
OnMonthCalendarVisibleMonthChanged ( object sender, RoutedPropertyChangedEventArgs e ) : void
OnMouseButtonDown ( object sender, System.Windows.Input.MouseButtonEventArgs e ) : void

If we (or one of our children) are clicked, claim the focus

OnNullValueTextChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnValueChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OpenOnLoad ( object sender, RoutedEventArgs e ) : void
RefreshDropDownButtonStyle ( ) : void
SelectFocusableDate ( ) : void

Select the focusable date

SetFlag ( Flags flag, bool set ) : void
UpdateEditableTextBox ( string text ) : void

Update the Text to the TextBox in editable mode

메소드 상세

OnApplyTemplate() 공개 메소드

Called when the Template's tree has been generated
public OnApplyTemplate ( ) : void
리턴 void

OnDropDownClosed() 보호된 메소드

Raise DropDownClosed event
protected OnDropDownClosed ( RoutedEventArgs e ) : void
e System.Windows.RoutedEventArgs
리턴 void

OnDropDownOpened() 보호된 메소드

Raise DropDownOpened event
protected OnDropDownOpened ( RoutedEventArgs e ) : void
e System.Windows.RoutedEventArgs
리턴 void

OnGotKeyboardFocus() 보호된 메소드

Called when this element gets focus.
protected OnGotKeyboardFocus ( System.Windows.Input.KeyboardFocusChangedEventArgs e ) : void
e System.Windows.Input.KeyboardFocusChangedEventArgs
리턴 void

OnInvalidEntry() 보호된 메소드

This event is invoked when datepicker can't parse the input string correctly
protected OnInvalidEntry ( InvalidEntryEventArgs e ) : void
e InvalidEntryEventArgs
리턴 void

OnLostMouseCapture() 보호된 메소드

Close the dropdown content if DatePicker lost the mouse capture
protected OnLostMouseCapture ( System.Windows.Input.MouseEventArgs e ) : void
e System.Windows.Input.MouseEventArgs
리턴 void

OnPreviewMouseLeftButtonDown() 보호된 메소드

When datepicker is editable, clicks the entry box should close the datepicker..
protected OnPreviewMouseLeftButtonDown ( System.Windows.Input.MouseButtonEventArgs e ) : void
e System.Windows.Input.MouseButtonEventArgs
리턴 void

OnValueChanged() 보호된 메소드

This method is invoked when the Value property changes.
protected OnValueChanged ( RoutedPropertyChangedEventArgs e ) : void
e RoutedPropertyChangedEventArgs RoutedPropertyChangedEventArgs contains the old and new value.
리턴 void

ToString() 공개 메소드

Returns a string representation for this control. "...DatePicker, Value:06/02/2006"
public ToString ( ) : string
리턴 string

프로퍼티 상세

CanEditProperty 공개적으로 정적으로 프로퍼티

The DependencyProperty for the CanEdit property
public static DependencyProperty,System.Windows CanEditProperty
리턴 System.Windows.DependencyProperty

DateConverterProperty 공개적으로 정적으로 프로퍼티

The DependencyProperty for the DateConverter Property
public static DependencyProperty,System.Windows DateConverterProperty
리턴 System.Windows.DependencyProperty

DropDownButtonStyleProperty 공개적으로 정적으로 프로퍼티

The DependencyProperty for the DropDownButtonStyle property. Flags: none Default Value: null
public static DependencyProperty,System.Windows DropDownButtonStyleProperty
리턴 System.Windows.DependencyProperty

DropDownClosedEvent 공개적으로 정적으로 프로퍼티

DropDownClosed event
public static RoutedEvent,System.Windows DropDownClosedEvent
리턴 System.Windows.RoutedEvent

DropDownOpenedEvent 공개적으로 정적으로 프로퍼티

DropDownOpened event
public static RoutedEvent,System.Windows DropDownOpenedEvent
리턴 System.Windows.RoutedEvent

InvalidEntryEvent 공개적으로 정적으로 프로퍼티

InvalidEntry event
public static RoutedEvent,System.Windows InvalidEntryEvent
리턴 System.Windows.RoutedEvent

IsDropDownOpenProperty 공개적으로 정적으로 프로퍼티

The DependencyProperty for the IsDropDownOpen property
public static DependencyProperty,System.Windows IsDropDownOpenProperty
리턴 System.Windows.DependencyProperty

IsReadOnlyProperty 공개적으로 정적으로 프로퍼티

The DependencyProperty for the IsReadOnly Property
public static DependencyProperty,System.Windows IsReadOnlyProperty
리턴 System.Windows.DependencyProperty

IsValidProperty 공개적으로 정적으로 프로퍼티

The DependencyProperty for the IsValid property.
public static DependencyProperty,System.Windows IsValidProperty
리턴 System.Windows.DependencyProperty

MaxDateProperty 공개적으로 정적으로 프로퍼티

The Property for the MaxDate property.
public static DependencyProperty,System.Windows MaxDateProperty
리턴 System.Windows.DependencyProperty

MinDateProperty 공개적으로 정적으로 프로퍼티

The Property for the MinDate property.
public static DependencyProperty,System.Windows MinDateProperty
리턴 System.Windows.DependencyProperty

MonthCalendarStyleProperty 공개적으로 정적으로 프로퍼티

The DependencyProperty for the MonthCalendarStyle Property
public static DependencyProperty,System.Windows MonthCalendarStyleProperty
리턴 System.Windows.DependencyProperty

NullValueTextProperty 공개적으로 정적으로 프로퍼티

The DependencyProperty for the NullValueText Property
public static DependencyProperty,System.Windows NullValueTextProperty
리턴 System.Windows.DependencyProperty

TextProperty 공개적으로 정적으로 프로퍼티

The DependencyProperty for the Text property.
public static DependencyProperty,System.Windows TextProperty
리턴 System.Windows.DependencyProperty

ValueChangedEvent 공개적으로 정적으로 프로퍼티

Event ID correspond to Value changed event
public static RoutedEvent,System.Windows ValueChangedEvent
리턴 System.Windows.RoutedEvent

ValueProperty 공개적으로 정적으로 프로퍼티

The DependencyProperty for the Value property
public static DependencyProperty,System.Windows ValueProperty
리턴 System.Windows.DependencyProperty