Class SfDateSelector
Represents a selectable object inside the Syncfusion.UI.Xaml.Controls.Input.DatePicker.
Inheritance
Implements
Namespace: Syncfusion.Windows.Controls.Input
Assembly: Syncfusion.SfInput.Wpf.dll
Syntax
public class SfDateSelector : Control, IDisposable
Remarks
DateSelector is a Windows.UI.Xaml.Controls.Control
Constructors
SfDateSelector()
Initializes a new instance of the Syncfusion.UI.Xaml.Controls.Input.DateSelector.
Declaration
public SfDateSelector()
See Also
Fields
AccentBrushProperty
Using a DependencyProperty as the backing store for AccentBrush. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty AccentBrushProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
DayCellTemplateProperty
Using a DependencyProperty as the backing store for DayCellTemplate. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty DayCellTemplateProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
DayCellTemplateSelectorProperty
Using a DependencyProperty as the backing store for DayCellTemplateSelector. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty DayCellTemplateSelectorProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
FormatStringProperty
Using a DependencyProperty as the backing store for ValueFormat. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty FormatStringProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
HeaderProperty
Using a DependencyProperty as the backing store for Header. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty HeaderProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
HeaderStyleProperty
Using a DependencyProperty as the backing store for HeaderStyle. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty HeaderStyleProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
HeaderTemplateProperty
Using a DependencyProperty as the backing store for HeaderTemplate. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty HeaderTemplateProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
MaxDateProperty
Using a DependencyProperty as the backing store for MaxDate. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty MaxDateProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
MinDateProperty
Using a DependencyProperty as the backing store for MinDate. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty MinDateProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
MonthCellTemplateProperty
Using a DependencyProperty as the backing store for MonthCellTemplate. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty MonthCellTemplateProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
MonthCellTemplateSelectorProperty
Using a DependencyProperty as the backing store for MonthcellSelector. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty MonthCellTemplateSelectorProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
SelectedDateTimeProperty
Using a DependencyProperty as the backing store for SelectedDateTime. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty SelectedDateTimeProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
SelectedForegroundProperty
Using a DependencyProperty as the backing store for AccentBrush. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty SelectedForegroundProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
SelectorItemCountProperty
Using a DependencyProperty as the backing store for SelectorItemCount. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty SelectorItemCountProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
SelectorItemHeightProperty
Using a DependencyProperty as the backing store for SelectorItemHeight. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty SelectorItemHeightProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
SelectorItemSpacingProperty
Using a DependencyProperty as the backing store for SelectorItemSpacing. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty SelectorItemSpacingProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
SelectorItemWidthProperty
Using a DependencyProperty as the backing store for SelectorItemWidth. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty SelectorItemWidthProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
SelectorStyleProperty
Using a DependencyProperty as the backing store for SelectorStyle. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty SelectorStyleProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
ShowCancelButtonProperty
Using a DependencyProperty as the backing store for ShowCancelButton. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty ShowCancelButtonProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
ShowDoneButtonProperty
Using a DependencyProperty as the backing store for ShowDoneButton. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty ShowDoneButtonProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
YearCellTemplateProperty
Using a DependencyProperty as the backing store for YearCellTemplate. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty YearCellTemplateProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
YearCellTemplateSelectorProperty
Using a DependencyProperty as the backing store for YearCellTemplateSelector. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty YearCellTemplateSelectorProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
Properties
AccentBrush
Gets or sets the background for Syncfusion.UI.Xaml.Controls.Input.DateSelector.
Declaration
public Brush AccentBrush { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Media.Brush | The default value is null. |
See Also
DayCellTemplate
Gets or sets the template for day looping selector.
Declaration
public DataTemplate DayCellTemplate { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.DataTemplate | The datatemplate of the day. |
Remarks
Use as the datatemplate for the day looping selector. The default value is null.
See Also
DayCellTemplateSelector
Gets or sets the template selector for day looping selector.
Declaration
public DataTemplateSelector DayCellTemplateSelector { get; set; }
Property Value
Type |
---|
System.Windows.Controls.DataTemplateSelector |
Remarks
Use as the datatemplate for the day looping selector. The default value is null.
See Also
FormatString
Getsor sets the Format of the string to be displayed in the Syncfusion.UI.Xaml.Controls.Input.DateSelector control.
Declaration
public object FormatString { get; set; }
Property Value
Type | Description |
---|---|
System.Object | The default value is m:d:y |
Header
Gets or sets the data used for the header of Syncfusion.UI.Xaml.Controls.Input.DateSelector.
Declaration
public object Header { get; set; }
Property Value
Type | Description |
---|---|
System.Object | The default value is null. |
See Also
HeaderStyle
Gets or sets the style of the header of the data control field.
Declaration
public Style HeaderStyle { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Style | The default value is null. |
Remarks
The HeaderStyle property governs the appearance of any text displayed in the header item
See Also
HeaderTemplate
Gets or sets the datatemplate used to display the content of the Syncfusion.UI.Xaml.Controls.Input.DateSelector header.
Declaration
public DataTemplate HeaderTemplate { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.DataTemplate | The default value is null. |
Remarks
Use the HeaderTemplate property to specify the custom content displayed for the header section of a date selector object
See Also
MaxDate
Gets or sets the Maximum number of dates to be listed in the Syncfusion.UI.Xaml.Controls.Input.DateSelector control.
Declaration
public DateTime MaxDate { get; set; }
Property Value
Type |
---|
System.DateTime |
MinDate
Gets or sets the Minimum number of dates to be listed in the Syncfusion.UI.Xaml.Controls.Input.DateSelector control.
Declaration
public DateTime MinDate { get; set; }
Property Value
Type |
---|
System.DateTime |
MonthCellTemplate
Gets or sets the template for month looping selector.
Declaration
public DataTemplate MonthCellTemplate { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.DataTemplate | The datatemplate of the month. |
Remarks
Use as the datatemplate for the month looping selector. The default value is null.
See Also
MonthCellTemplateSelector
Gets or sets the template selector for month looping selector.
Declaration
public DataTemplateSelector MonthCellTemplateSelector { get; set; }
Property Value
Type |
---|
System.Windows.Controls.DataTemplateSelector |
Remarks
Use as the datatemplate for the month looping selector. The default value is null.
See Also
SelectedDateTime
Gets or sets the currently selected date for Syncfusion.UI.Xaml.Controls.Input.DateSelector.
Declaration
public Nullable<DateTime> SelectedDateTime { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.DateTime> | The default value is System.DateTime.Now. |
Remarks
Use to hold the currently selected date value.
See Also
SelectedForeground
Gets or sets the background for Syncfusion.UI.Xaml.Controls.Input.DateSelector.
Declaration
public Brush SelectedForeground { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Media.Brush | The default value is null. |
See Also
SelectorItemCount
Gets or sets the SelectorItemCount for the date selector items
Declaration
public int SelectorItemCount { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The default value is 0 |
SelectorItemHeight
Gets or sets the SelectorItemHeight for the date selector items
Declaration
public double SelectorItemHeight { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The default value is 70 |
SelectorItemSpacing
Gets or sets the SelectorItemSpacing for the date selector items
Declaration
public double SelectorItemSpacing { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The default value is 4 |
SelectorItemWidth
Gets or sets the SelectorItemWidth for the date selector items
Declaration
public double SelectorItemWidth { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The default value is 80 |
SelectorStyle
Gets or sets the style that apply for the Syncfusion.UI.Xaml.Controls.LoopingSelector.
Declaration
public Style SelectorStyle { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Style | The default value is null. |
Remarks
Use to apply the style to the looping selector inside the Syncfusion.UI.Xaml.Controls.Input.DateSelector.
See Also
ShowCancelButton
Gets or sets a value indicating whether show or hide the cancel button .
Declaration
public bool ShowCancelButton { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Remarks
The default value is true.
See Also
ShowDoneButton
Gets or sets a value indicating whether show or hide the done button.
Declaration
public bool ShowDoneButton { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Remarks
The default value is true.
See Also
YearCellTemplate
Gets or sets the template for year looping selector.
Declaration
public DataTemplate YearCellTemplate { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.DataTemplate | The datatemplate of the year. |
Remarks
Use as the datatemplate for the year looping selector. The default value is null.
See Also
YearCellTemplateSelector
Gets or sets the template selector for year looping selector.
Declaration
public DataTemplateSelector YearCellTemplateSelector { get; set; }
Property Value
Type |
---|
System.Windows.Controls.DataTemplateSelector |
Remarks
Use as the datatemplate for the year looping selector. The default value is null.
See Also
Methods
Dispose()
Unhooks all the events that are hooked
Declaration
public void Dispose()
OnApplyTemplate()
Initializes all the child elements of Syncfusion.UI.Xaml.Controls.Input.DateSelector control.
Declaration
public override void OnApplyTemplate()
OnFormatStringChanged(DependencyPropertyChangedEventArgs)
Occurs when the data used as FormatString has changed.
Declaration
protected virtual void OnFormatStringChanged(DependencyPropertyChangedEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyPropertyChangedEventArgs | args |
OnGotFocus(RoutedEventArgs)
Occurs when the SfDateSelector receives focus.
Declaration
protected override void OnGotFocus(RoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.RoutedEventArgs | e |
OnKeyDown(KeyEventArgs)
Handles keydown event Syncfusion.UI.Xaml.Controls.Input.DateSelector control.
Declaration
protected override void OnKeyDown(KeyEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.KeyEventArgs | e |
OnMouseLeftButtonDown(MouseButtonEventArgs)
Invoked when an unhandled System.Windows.UIElement.MouseLeftButtonDown routed event is raised on this element. Implement this method to add class handling for this event.
Declaration
protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.MouseButtonEventArgs | e | The System.Windows.Input.MouseButtonEventArgs that contains the event data. The event data reports that the left mouse button was pressed. |
Events
Cancel
Occurs when cancel button is clicked.
Declaration
public event RoutedEventHandler Cancel
Event Type
Type |
---|
System.Windows.RoutedEventHandler |
Done
Occurs when done is clicked.
Declaration
public event RoutedEventHandler Done
Event Type
Type |
---|
System.Windows.RoutedEventHandler |
SelectedDateTimeChanged
Occurs when selected date changed.
Declaration
public event PropertyChangedCallback SelectedDateTimeChanged
Event Type
Type |
---|
System.Windows.PropertyChangedCallback |
Remarks
raised when selected date property is changed.