DatePicker
- Assembly:
Fluence.Wpf - Namespace:
Fluence.Wpf.Controls
public class DatePicker : Control
A control that lets the user pick a calendar date from day, month, and year selector columns hosted in a light-dismiss flyout, mirroring the WinUI 3 DatePicker. The always-visible field is a button-styled row showing the selected day, month name, and year ordered by the current culture's short date pattern; the flyout commits the pending column selection through its accept button and discards it through cancel.
Base type: Control (including inherited WPF and .NET members)
Constructors
DatePicker
public DatePicker()
Creates a new DatePicker instance.
Properties
DayVisible
public bool DayVisible { get; set; }
Gets or sets whether the day segment and selector column are shown.
Header
public object? Header { get; set; }
Gets or sets the optional header content shown above the field.
MaxYear
public int MaxYear { get; set; }
Gets or sets the last year offered by the year selector column.
MinYear
public int MinYear { get; set; }
Gets or sets the first year offered by the year selector column.
MonthVisible
public bool MonthVisible { get; set; }
Gets or sets whether the month segment and selector column are shown.
PlaceholderText
public string PlaceholderText { get; set; }
Gets or sets the placeholder text shown in the field while SelectedDate is null (for example "Pick a date").
SelectedDate
public DateTime? SelectedDate { get; set; }
Gets or sets the currently selected date, or null when no date has been picked yet. Changing this property raises SelectedDateChanged.
YearVisible
public bool YearVisible { get; set; }
Gets or sets whether the year segment and selector column are shown.
Methods
OnApplyTemplate
public override void OnApplyTemplate()
Documentation inherited from the Control API.
OnCreateAutomationPeer
protected override AutomationPeer OnCreateAutomationPeer()
Documentation inherited from the Control API.
Events
SelectedDateChanged
public event EventHandler<DatePickerSelectedValueChangedEventArgs>? SelectedDateChanged
Occurs after SelectedDate changes, whether through the flyout's accept button or a programmatic update.
Dependency property identifiers
Use these identifiers with WPF property APIs. The matching CLR properties appear above when the control exposes them.
DayVisibleProperty
public static readonly DependencyProperty DayVisibleProperty
Identifies the DayVisible dependency property.
HeaderProperty
public static readonly DependencyProperty HeaderProperty
Identifies the Header dependency property.
MaxYearProperty
public static readonly DependencyProperty MaxYearProperty
Identifies the MaxYear dependency property.
MinYearProperty
public static readonly DependencyProperty MinYearProperty
Identifies the MinYear dependency property.
MonthVisibleProperty
public static readonly DependencyProperty MonthVisibleProperty
Identifies the MonthVisible dependency property.
PlaceholderTextProperty
public static readonly DependencyProperty PlaceholderTextProperty
Identifies the PlaceholderText dependency property.
SelectedDateProperty
public static readonly DependencyProperty SelectedDateProperty
Identifies the SelectedDate dependency property.
YearVisibleProperty
public static readonly DependencyProperty YearVisibleProperty
Identifies the YearVisible dependency property.