C# Class FarsiLibrary.WPF.Controls.FXDatePicker

Inheritance: System.Windows.Controls.ComboBox
Datei anzeigen Open project: HEskandari/FarsiLibrary Class Usage Examples

Public Properties

Property Type Description
DateConverterProperty System.Windows.DependencyProperty
DropDownButtonStyleProperty System.Windows.DependencyProperty
DropDownClosedEvent System.Windows.RoutedEvent
DropDownOpenedEvent System.Windows.RoutedEvent
InvalidEntryEvent System.Windows.RoutedEvent
IsDropDownOpenProperty System.Windows.DependencyProperty
IsValidProperty System.Windows.DependencyProperty
MaxDateProperty System.Windows.DependencyProperty
MinDateProperty System.Windows.DependencyProperty
MonthViewStyleProperty System.Windows.DependencyProperty
NullValueTextProperty System.Windows.DependencyProperty
SelectedDateTimeChangedEvent System.Windows.RoutedEvent
SelectedDateTimeProperty System.Windows.DependencyProperty
ShowEmptyButtonProperty System.Windows.DependencyProperty
ShowTodayButtonProperty System.Windows.DependencyProperty
ShowWeekDayNamesProperty System.Windows.DependencyProperty
TextProperty System.Windows.DependencyProperty
ViewDateTimeProperty System.Windows.DependencyProperty

Private Properties

Property Type Description
AttachToVisualTree void
CoerceIsDropDownOpen object
CoerceMaxDate object
CoerceSelectedDateTime object
DetachFromVisualTree void
DoFormat string
DoFormat void
FXDatePicker System
IsDescendant bool
IsFocusable bool
KeyDownHandler void
KeyDownHandler void
KeyboardToggleDropDown void
OnContextMenuClose void
OnContextMenuOpen void
OnDateConverterChanged void
OnDropDownButtonStyleChanged void
OnIsDropDownOpenChanged void
OnMaxDateChanged void
OnMinDateChanged void
OnMonthViewCommandPreviewExecuted void
OnMonthViewDateTimeSelectionChanged void
OnMouseButtonDown void
OnNullValueTextChanged void
OnSelectedDateTimeChanged void
OnValuePresenterDoubleClick void
OnViewDateTimeChanged void
OpenOnLoad void
RefreshDropDownButtonStyle void
SelectFocusableDate void

Public Methods

Method Description
OnApplyTemplate ( ) : void

Called when the Template's tree has been generated

SetNoneDate ( ) : void
SetTodayDate ( ) : void
ToString ( ) : string

Returns a string representation for this control. "FXDatePicker, SelectedDateTime:06/02/2006"

Protected Methods

Method Description
CoerceViewDateTime ( DependencyObject d, object value ) : object
OnCreateAutomationPeer ( ) : System.Windows.Automation.Peers.AutomationPeer
OnDropDownClosed ( RoutedEventArgs e ) : void

Raise DropDownClosed event

OnDropDownOpened ( RoutedEventArgs e ) : void

Raise DropDownOpened event

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 FXDatePicker lost the mouse capture

OnSelectedDateTimeChanged ( RoutedPropertyChangedEventArgs e ) : void

This method is invoked when the SelectedDateTime property changes.

Private Methods

Method Description
AttachToVisualTree ( ) : void

Detaches the EditableTextBox, MonthView 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
CoerceSelectedDateTime ( DependencyObject d, object value ) : object
DetachFromVisualTree ( ) : void

Clear the event, and detach our current EditableTextBox from ComboBox

DoFormat ( System.DateTime date ) : string
DoFormat ( ) : void

Format SelectedDateTime property to a formatted string

FXDatePicker ( ) : System

Ctor

IsDescendant ( Visual reference, Visual node ) : bool

True, if node is derived from reference

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.

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
OnDropDownButtonStyleChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnIsDropDownOpenChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnMaxDateChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnMinDateChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnMonthViewCommandPreviewExecuted ( object sender, System.Windows.Input.ExecutedRoutedEventArgs args ) : void
OnMonthViewDateTimeSelectionChanged ( object sender, DateSelectionChangedEventArgs 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
OnSelectedDateTimeChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnValuePresenterDoubleClick ( object sender, System.Windows.Input.MouseButtonEventArgs e ) : void
OnViewDateTimeChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OpenOnLoad ( object sender, RoutedEventArgs e ) : void
RefreshDropDownButtonStyle ( ) : void
SelectFocusableDate ( ) : void

Select the focusable date

Method Details

CoerceViewDateTime() protected static method

protected static CoerceViewDateTime ( DependencyObject d, object value ) : object
d System.Windows.DependencyObject
value object
return object

OnApplyTemplate() public method

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

OnCreateAutomationPeer() protected method

protected OnCreateAutomationPeer ( ) : System.Windows.Automation.Peers.AutomationPeer
return System.Windows.Automation.Peers.AutomationPeer

OnDropDownClosed() protected method

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

OnDropDownOpened() protected method

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

OnInvalidEntry() protected method

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

OnLostMouseCapture() protected method

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

OnSelectedDateTimeChanged() protected method

This method is invoked when the SelectedDateTime property changes.
protected OnSelectedDateTimeChanged ( RoutedPropertyChangedEventArgs e ) : void
e RoutedPropertyChangedEventArgs RoutedPropertyChangedEventArgs contains the old and new value.
return void

SetNoneDate() public method

public SetNoneDate ( ) : void
return void

SetTodayDate() public method

public SetTodayDate ( ) : void
return void

ToString() public method

Returns a string representation for this control. "FXDatePicker, SelectedDateTime:06/02/2006"
public ToString ( ) : string
return string

Property Details

DateConverterProperty public_oe static_oe property

public static DependencyProperty,System.Windows DateConverterProperty
return System.Windows.DependencyProperty

DropDownButtonStyleProperty public_oe static_oe property

public static DependencyProperty,System.Windows DropDownButtonStyleProperty
return System.Windows.DependencyProperty

DropDownClosedEvent public_oe static_oe property

public static RoutedEvent,System.Windows DropDownClosedEvent
return System.Windows.RoutedEvent

DropDownOpenedEvent public_oe static_oe property

public static RoutedEvent,System.Windows DropDownOpenedEvent
return System.Windows.RoutedEvent

InvalidEntryEvent public_oe static_oe property

public static RoutedEvent,System.Windows InvalidEntryEvent
return System.Windows.RoutedEvent

IsDropDownOpenProperty public_oe static_oe property

public static DependencyProperty,System.Windows IsDropDownOpenProperty
return System.Windows.DependencyProperty

IsValidProperty public_oe static_oe property

public static DependencyProperty,System.Windows IsValidProperty
return System.Windows.DependencyProperty

MaxDateProperty public_oe static_oe property

public static DependencyProperty,System.Windows MaxDateProperty
return System.Windows.DependencyProperty

MinDateProperty public_oe static_oe property

public static DependencyProperty,System.Windows MinDateProperty
return System.Windows.DependencyProperty

MonthViewStyleProperty public_oe static_oe property

public static DependencyProperty,System.Windows MonthViewStyleProperty
return System.Windows.DependencyProperty

NullValueTextProperty public_oe static_oe property

public static DependencyProperty,System.Windows NullValueTextProperty
return System.Windows.DependencyProperty

SelectedDateTimeChangedEvent public_oe static_oe property

public static RoutedEvent,System.Windows SelectedDateTimeChangedEvent
return System.Windows.RoutedEvent

SelectedDateTimeProperty public_oe static_oe property

public static DependencyProperty,System.Windows SelectedDateTimeProperty
return System.Windows.DependencyProperty

ShowEmptyButtonProperty public_oe static_oe property

public static DependencyProperty,System.Windows ShowEmptyButtonProperty
return System.Windows.DependencyProperty

ShowTodayButtonProperty public_oe static_oe property

public static DependencyProperty,System.Windows ShowTodayButtonProperty
return System.Windows.DependencyProperty

ShowWeekDayNamesProperty public_oe static_oe property

public static DependencyProperty,System.Windows ShowWeekDayNamesProperty
return System.Windows.DependencyProperty

TextProperty public_oe static_oe property

public static DependencyProperty,System.Windows TextProperty
return System.Windows.DependencyProperty

ViewDateTimeProperty public_oe static_oe property

public static DependencyProperty,System.Windows ViewDateTimeProperty
return System.Windows.DependencyProperty