Class DatePickerBox
Control mimicking a DatePicker.
Inheritance
Namespace: Sartorius.SAF.Presentation.Controls
Assembly: Sartorius.SAF.Presentation.Controls.dll
Syntax
[TemplatePart(Name = "PART_DateSelectionBox", Type = typeof(Calendar))]
[TemplatePart(Name = "PART_DateSelectionPopup", Type = typeof(Popup))]
public class DatePickerBox : Control, IAnimatable, ISupportInitialize, IFrameworkInputElement, IInputElement, IQueryAmbient
Constructors
View SourceDatePickerBox()
Initializes a new instance of the DatePickerBox class.
Declaration
public DatePickerBox()
Fields
View SourceCalendarModeProperty
The calendar mode property
Declaration
public static readonly DependencyProperty CalendarModeProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
HasResetButtonProperty
Identifies the DependencyProperty for HasResetButton.
Declaration
public static readonly DependencyProperty HasResetButtonProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
IsDropDownOpenProperty
The is drop down open property
Declaration
public static readonly DependencyProperty IsDropDownOpenProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
IsResetButtonVisibleProperty
Identifies the DependencyProperty for IsResetButtonVisible.
Declaration
public static readonly DependencyProperty IsResetButtonVisibleProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
MaxDateProperty
Defines the dependency property for the MaxDate property.
Declaration
public static readonly DependencyProperty MaxDateProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
MinDateProperty
Defines the dependency property for the MinDate property.
Declaration
public static readonly DependencyProperty MinDateProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
ResetCommandProperty
Identifies the DependencyProperty for ResetCommand.
Declaration
public static readonly DependencyProperty ResetCommandProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
ResetEvent
Identifies the RoutedEvent for Reset.
Declaration
public static readonly RoutedEvent ResetEvent
Field Value
| Type | Description |
|---|---|
| RoutedEvent |
SelectedDateProperty
Defines the dependency property for the SelectedDate property.
Declaration
public static readonly DependencyProperty SelectedDateProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
SelectedDateValueProperty
The selected date value property
Declaration
public static readonly DependencyProperty SelectedDateValueProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
StaysOpenProperty
The stays open property
Declaration
public static readonly DependencyProperty StaysOpenProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
Properties
View SourceCalendarMode
Gets or sets the default calendar mode.
Declaration
public CalendarMode CalendarMode { get; set; }
Property Value
| Type | Description |
|---|---|
| CalendarMode |
HasResetButton
Gets or sets a value indicating whether the Reset Button should be displayed at all.
Declaration
public bool HasResetButton { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
|
IsDropDownOpen
Determines whether the dropdown (popup) is open or not.
Declaration
public bool IsDropDownOpen { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
IsResetButtonVisible
Gets or sets a value indicating whether the Reset Button should be visible.
Declaration
public bool? IsResetButtonVisible { get; set; }
Property Value
| Type | Description |
|---|---|
| bool? |
|
MaxDate
Indicates maximum date the user can select.
Declaration
public DateTime MaxDate { get; set; }
Property Value
| Type | Description |
|---|---|
| DateTime |
MinDate
Indicates minimum date the user can select.
Declaration
public DateTime MinDate { get; set; }
Property Value
| Type | Description |
|---|---|
| DateTime |
ResetCommand
Gets the reset command.
Declaration
public ICommand ResetCommand { get; }
Property Value
| Type | Description |
|---|---|
| ICommand | The reset command. |
SelectedDate
The selected date.
Declaration
public DateTime? SelectedDate { get; set; }
Property Value
| Type | Description |
|---|---|
| DateTime? |
SelectedDateValue
Represents the selected data as string.
Declaration
public string SelectedDateValue { get; }
Property Value
| Type | Description |
|---|---|
| string |
StaysOpen
Determines whether the popup stays open when a date has been selected.
Declaration
public bool StaysOpen { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Methods
View SourceGetMaxDate(UIElement)
Gets the MaxDate;
Declaration
public static DateTime GetMaxDate(UIElement element)
Parameters
| Type | Name | Description |
|---|---|---|
| UIElement | element |
Returns
| Type | Description |
|---|---|
| DateTime |
GetMinDate(UIElement)
Gets the MaxDate
Declaration
public static DateTime GetMinDate(UIElement element)
Parameters
| Type | Name | Description |
|---|---|---|
| UIElement | element |
Returns
| Type | Description |
|---|---|
| DateTime |
GetSelectedDate(UIElement)
Gets the selectedDate;
Declaration
public static DateTime? GetSelectedDate(UIElement element)
Parameters
| Type | Name | Description |
|---|---|---|
| UIElement | element |
Returns
| Type | Description |
|---|---|
| DateTime? |
OnApplyTemplate()
When overridden in a derived class, is invoked whenever application code or internal processes call ApplyTemplate().
Declaration
public override void OnApplyTemplate()
Overrides
View SourceOnPreviewKeyDown(KeyEventArgs)
method that checks whether the event is further processed. it is processed if the maximal number of selectable items is not reached
Declaration
[SuppressMessage("Design", "CA1062:Validate arguments of public methods", Justification = "Parameter e is never null")]
protected override void OnPreviewKeyDown(KeyEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| KeyEventArgs | e |
Overrides
View SourceSetMaxDate(UIElement, DateTime)
Sets the selectedDate;
Declaration
public static void SetMaxDate(UIElement element, DateTime value)
Parameters
| Type | Name | Description |
|---|---|---|
| UIElement | element | |
| DateTime | value |
SetMinDate(UIElement, DateTime)
Sets the selectedDate;
Declaration
public static void SetMinDate(UIElement element, DateTime value)
Parameters
| Type | Name | Description |
|---|---|---|
| UIElement | element | |
| DateTime | value |
SetSelectedDate(UIElement, DateTime?)
Sets the selectedDate;
Declaration
public static void SetSelectedDate(UIElement element, DateTime? value)
Parameters
| Type | Name | Description |
|---|---|---|
| UIElement | element | |
| DateTime? | value |
Events
View SourceReset
Occurs when reset is clicked.
Declaration
public event RoutedEventHandler Reset
Event Type
| Type | Description |
|---|---|
| RoutedEventHandler |