Class DatePickerPresenter
Defines the presenter used for selecting a date for a DatePicker
[TemplatePart("PART_AcceptButton", typeof(Button), IsRequired = true)]
[TemplatePart("PART_DayDownButton", typeof(RepeatButton))]
[TemplatePart("PART_DayHost", typeof(Panel), IsRequired = true)]
[TemplatePart("PART_DaySelector", typeof(DateTimePickerPanel), IsRequired = true)]
[TemplatePart("PART_DayUpButton", typeof(RepeatButton))]
[TemplatePart("PART_DismissButton", typeof(Button))]
[TemplatePart("PART_FirstSpacer", typeof(Rectangle))]
[TemplatePart("PART_MonthDownButton", typeof(RepeatButton))]
[TemplatePart("PART_MonthHost", typeof(Panel), IsRequired = true)]
[TemplatePart("PART_MonthSelector", typeof(DateTimePickerPanel), IsRequired = true)]
[TemplatePart("PART_MonthUpButton", typeof(RepeatButton))]
[TemplatePart("PART_PickerContainer", typeof(Grid), IsRequired = true)]
[TemplatePart("PART_SecondSpacer", typeof(Rectangle))]
[TemplatePart("PART_YearDownButton", typeof(RepeatButton))]
[TemplatePart("PART_YearHost", typeof(Panel), IsRequired = true)]
[TemplatePart("PART_YearSelector", typeof(DateTimePickerPanel), IsRequired = true)]
[TemplatePart("PART_YearUpButton", typeof(RepeatButton))]
public class DatePickerPresenter : PickerPresenterBase, INotifyPropertyChanged, IDataContextProvider, ILogical, IThemeVariantHost, IResourceHost, IResourceNode, IStyleHost, ISetLogicalParent, ISetInheritanceParent, ISupportInitialize, IStyleable, INamed, IInputElement, IDataTemplateHost, ISetterValue
- Inheritance
-
DatePickerPresenter
- Implements
- Inherited Members
- Extension Methods
Constructors
DatePickerPresenter()
public DatePickerPresenter()
Fields
DateProperty
Defines the Date Property
public static readonly StyledProperty<DateTimeOffset> DateProperty
Field Value
DayFormatProperty
Defines the DayFormat Property
public static readonly StyledProperty<string> DayFormatProperty
Field Value
DayVisibleProperty
Defines the DayVisible Property
public static readonly StyledProperty<bool> DayVisibleProperty
Field Value
MaxYearProperty
Defines the MaxYear Property
public static readonly StyledProperty<DateTimeOffset> MaxYearProperty
Field Value
MinYearProperty
Defines the MinYear Property
public static readonly StyledProperty<DateTimeOffset> MinYearProperty
Field Value
MonthFormatProperty
Defines the MonthFormat Property
public static readonly StyledProperty<string> MonthFormatProperty
Field Value
MonthVisibleProperty
Defines the MonthVisible Property
public static readonly StyledProperty<bool> MonthVisibleProperty
Field Value
YearFormatProperty
Defines the YearFormat Property
public static readonly StyledProperty<string> YearFormatProperty
Field Value
YearVisibleProperty
Defines the YearVisible Property
public static readonly StyledProperty<bool> YearVisibleProperty
Field Value
Properties
Date
Gets or sets the current Date for the picker
public DateTimeOffset Date { get; set; }
Property Value
DayFormat
Gets or sets the DayFormat
public string DayFormat { get; set; }
Property Value
DayVisible
Get or sets whether the Day selector is visible
public bool DayVisible { get; set; }
Property Value
MaxYear
Gets or sets the maximum pickable year
public DateTimeOffset MaxYear { get; set; }
Property Value
MinYear
Gets or sets the minimum pickable year
public DateTimeOffset MinYear { get; set; }
Property Value
MonthFormat
Gets or sets the month format
public string MonthFormat { get; set; }
Property Value
MonthVisible
Gets or sets whether the month selector is visible
public bool MonthVisible { get; set; }
Property Value
YearFormat
Gets or sets the year format
public string YearFormat { get; set; }
Property Value
YearVisible
Gets or sets whether the year selector is visible
public bool YearVisible { get; set; }
Property Value
Methods
OnApplyTemplate(TemplateAppliedEventArgs)
Called when the control's template is applied. In simple terms, this means the method is called just before the control is displayed.
protected override void OnApplyTemplate(TemplateAppliedEventArgs e)
Parameters
e
TemplateAppliedEventArgsThe event args.
OnKeyDown(KeyEventArgs)
Called before the KeyDown event occurs.
protected override void OnKeyDown(KeyEventArgs e)
Parameters
e
KeyEventArgsThe event args.
OnPropertyChanged(AvaloniaPropertyChangedEventArgs)
Called when a avalonia property changes on the object.
protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change)
Parameters
change
AvaloniaPropertyChangedEventArgsThe property change details.