DatePickerFlyout DatePickerFlyout DatePickerFlyout Class

Represents a control that allows a user to pick a date.

Syntax

Declaration

public sealed class DatePickerFlyoutpublic sealed class DatePickerFlyoutPublic NotInheritable Class DatePickerFlyout

Inheritance Hierarchy

Inherited Members

Inherited properties

, , , , , , , , , , , , , , ,

Inherited methods

, , , , , , , , , , , , , , , ,

Inherited events

, , ,

Constructors summary

Initializes a new instance of the DatePickerFlyout class.

Properties summary

Gets or sets the calendar system to use.

Gets the identifier for the CalendarIdentifier dependency property.

Gets or sets the date currently set in the date picker.

Gets the identifier for the Date dependency property.

Gets or sets the display format for the day value.

Identifies the DayFormat dependency property.

Gets or sets a value that indicates whether the day selector is shown.

Gets the identifier for the DayVisible dependency property.

Gets or sets the maximum Gregorian year available for picking.

Gets the identifier for the MaxYear dependency property.

Gets or sets the minimum Gregorian year available for picking.

Gets the identifier for the MinYear dependency property.

Gets or sets the display format for the month value.

Identifies the MonthFormat dependency property.

Gets or sets a value that indicates whether the month selector is shown.

Gets the identifier for the MonthVisible dependency property.

Gets or sets the display format for the year value.

Identifies the YearFormat dependency property.

Gets or sets a value that indicates whether the year selector is shown.

Gets the identifier for the YearVisible dependency property.

Methods summary

Begins an asynchronous operation to show the date picker placed in relation to the specified element.

Events summary

Occurs when a date has been picked by the user.

Constructors

  • DatePickerFlyout()
    DatePickerFlyout()
    DatePickerFlyout()
    DatePickerFlyout()

    Initializes a new instance of the DatePickerFlyout class.

    public DatePickerFlyout()public New()Public Sub New()public DatePickerFlyout()

Properties

  • CalendarIdentifier
    CalendarIdentifier
    CalendarIdentifier
    CalendarIdentifier

    Gets or sets the calendar system to use.

    public string CalendarIdentifier { get; set; }public string CalendarIdentifier { get; set; }Public ReadWrite Property CalendarIdentifier As stringpublic string CalendarIdentifier { get; set; }

    Property Value

    • string
      string
      string

      The name of the calendar system to use. For a list of supported calendar systems, see CalendarIdentifiers.

  • CalendarIdentifierProperty
    CalendarIdentifierProperty
    CalendarIdentifierProperty
    CalendarIdentifierProperty

    Gets the identifier for the CalendarIdentifier dependency property.

    public static DependencyProperty CalendarIdentifierProperty { get; }public static DependencyProperty CalendarIdentifierProperty { get; }Public Static ReadOnly Property CalendarIdentifierProperty As DependencyPropertypublic static DependencyProperty CalendarIdentifierProperty { get; }

    Property Value

  • Date
    Date
    Date
    Date

    Gets or sets the date currently set in the date picker.

    public DateTime Date { get; set; }public DateTimeOffset Date { get; set; }Public ReadWrite Property Date As DateTimeOffsetpublic DateTime Date { get; set; }

    Property Value

  • DateProperty
    DateProperty
    DateProperty
    DateProperty

    Gets the identifier for the Date dependency property.

    public static DependencyProperty DateProperty { get; }public static DependencyProperty DateProperty { get; }Public Static ReadOnly Property DateProperty As DependencyPropertypublic static DependencyProperty DateProperty { get; }

    Property Value

  • DayFormat
    DayFormat
    DayFormat
    DayFormat

    Gets or sets the display format for the day value.

    public string DayFormat { get; set; }public string DayFormat { get; set; }Public ReadWrite Property DayFormat As stringpublic string DayFormat { get; set; }
    <DatePickerFlyout DayFormat="formatString"/>
    

    Property Value

    • string
      string
      string

      The display format for the day value.

    Remarks

    Change the format of the day value by setting the DayFormat property.

    The string content of the day value is created by a DateTimeFormatter. You inform the DateTimeFormatter how to format the day value by providing a string that is either a format template or a format pattern. Common templates and patterns for day values are listed in the following table.

    format patternformat template
    {day.integer} | {day.integer(n)}day
    {dayofweek.full} | {dayofweek.abbreviated} | {dayofweek.abbreviated(n)}dayofweek | dayofweek.full | dayofweek.abbreviated

    In some cases, using a format pattern gives you more precise control over the formatting. For example, you can use a format pattern to specify that the day picker always shows 2 digits, including a leading 0 when needed. You can also combine multiple format patterns. For example, you can combine the {day} and {dayofweek.abbreviated} formats to make the day picker show both the numeric date and the day of the week, like this: 14 Thu. See the Examples section for more info.

    For the complete list of format templates and format patterns, see the Remarks section of the DateTimeFormatter class documentation.

  • DayFormatProperty
    DayFormatProperty
    DayFormatProperty
    DayFormatProperty

    Identifies the DayFormat dependency property.

    public static DependencyProperty DayFormatProperty { get; }public static DependencyProperty DayFormatProperty { get; }Public Static ReadOnly Property DayFormatProperty As DependencyPropertypublic static DependencyProperty DayFormatProperty { get; }

    Property Value

  • DayVisible
    DayVisible
    DayVisible
    DayVisible

    Gets or sets a value that indicates whether the day selector is shown.

    public bool DayVisible { get; set; }public bool DayVisible { get; set; }Public ReadWrite Property DayVisible As boolpublic bool DayVisible { get; set; }

    Property Value

    • bool
      bool
      bool

      True if the day selector is shown; otherwise, false. The default is true.

  • DayVisibleProperty
    DayVisibleProperty
    DayVisibleProperty
    DayVisibleProperty

    Gets the identifier for the DayVisible dependency property.

    public static DependencyProperty DayVisibleProperty { get; }public static DependencyProperty DayVisibleProperty { get; }Public Static ReadOnly Property DayVisibleProperty As DependencyPropertypublic static DependencyProperty DayVisibleProperty { get; }

    Property Value

  • MaxYear
    MaxYear
    MaxYear
    MaxYear

    Gets or sets the maximum Gregorian year available for picking.

    public DateTime MaxYear { get; set; }public DateTimeOffset MaxYear { get; set; }Public ReadWrite Property MaxYear As DateTimeOffsetpublic DateTime MaxYear { get; set; }

    Property Value

  • MaxYearProperty
    MaxYearProperty
    MaxYearProperty
    MaxYearProperty

    Gets the identifier for the MaxYear dependency property.

    public static DependencyProperty MaxYearProperty { get; }public static DependencyProperty MaxYearProperty { get; }Public Static ReadOnly Property MaxYearProperty As DependencyPropertypublic static DependencyProperty MaxYearProperty { get; }

    Property Value

  • MinYear
    MinYear
    MinYear
    MinYear

    Gets or sets the minimum Gregorian year available for picking.

    public DateTime MinYear { get; set; }public DateTimeOffset MinYear { get; set; }Public ReadWrite Property MinYear As DateTimeOffsetpublic DateTime MinYear { get; set; }

    Property Value

  • MinYearProperty
    MinYearProperty
    MinYearProperty
    MinYearProperty

    Gets the identifier for the MinYear dependency property.

    public static DependencyProperty MinYearProperty { get; }public static DependencyProperty MinYearProperty { get; }Public Static ReadOnly Property MinYearProperty As DependencyPropertypublic static DependencyProperty MinYearProperty { get; }

    Property Value

  • MonthFormat
    MonthFormat
    MonthFormat
    MonthFormat

    Gets or sets the display format for the month value.

    public string MonthFormat { get; set; }public string MonthFormat { get; set; }Public ReadWrite Property MonthFormat As stringpublic string MonthFormat { get; set; }
    <DatePickerFlyout MonthFormat="formatString"/>
    

    Property Value

    • string
      string
      string

      The display format for the month value.

    Remarks

    Change the format of the month value by setting the MonthFormat property.

    The string content of the month value is created by a DateTimeFormatter. You inform the DateTimeFormatter how to format the day value by providing a string that is either a format template or a format pattern. Common templates and patterns for day values are listed in the following table.

    format patternformat template
    {month.integer} | {month.integer(n)}month.numeric
    {month.full} | {month.abbreviated} | {month.abbreviated(n)}month | month.full | month.abbreviated

    In some cases, using a format pattern gives you more precise control over the formatting. For example, you can use a format pattern to specify that the month picker always shows 2 digits, including a leading 0 when needed. You can also combine multiple format patterns. For example, you can combine the {month.integer} and {month.abbreviated} formats to make the month picker show the month number and name, like this: 12 Dec. See the Examples section for more info.

    For the complete list of format templates and format patterns, see the Remarks section of the DateTimeFormatter class documentation.

  • MonthFormatProperty
    MonthFormatProperty
    MonthFormatProperty
    MonthFormatProperty

    Identifies the MonthFormat dependency property.

    public static DependencyProperty MonthFormatProperty { get; }public static DependencyProperty MonthFormatProperty { get; }Public Static ReadOnly Property MonthFormatProperty As DependencyPropertypublic static DependencyProperty MonthFormatProperty { get; }

    Property Value

  • MonthVisible
    MonthVisible
    MonthVisible
    MonthVisible

    Gets or sets a value that indicates whether the month selector is shown.

    public bool MonthVisible { get; set; }public bool MonthVisible { get; set; }Public ReadWrite Property MonthVisible As boolpublic bool MonthVisible { get; set; }

    Property Value

    • bool
      bool
      bool

      True if the month selector is shown; otherwise, false. The default is true.

  • MonthVisibleProperty
    MonthVisibleProperty
    MonthVisibleProperty
    MonthVisibleProperty

    Gets the identifier for the MonthVisible dependency property.

    public static DependencyProperty MonthVisibleProperty { get; }public static DependencyProperty MonthVisibleProperty { get; }Public Static ReadOnly Property MonthVisibleProperty As DependencyPropertypublic static DependencyProperty MonthVisibleProperty { get; }

    Property Value

  • YearFormat
    YearFormat
    YearFormat
    YearFormat

    Gets or sets the display format for the year value.

    public string YearFormat { get; set; }public string YearFormat { get; set; }Public ReadWrite Property YearFormat As stringpublic string YearFormat { get; set; }
    <DatePickerFlyout YearFormat="formatString"/>
    

    Property Value

    • string
      string
      string

      The display format for the year value.

    Remarks

    Change the format of the year value by setting the YearFormat property.

    The string content of the year value is created by a DateTimeFormatter. You inform the DateTimeFormatter how to format the year value by providing a string that is either a format template or a format pattern. Common templates and patterns for year values are listed in the following table.

    format patternformat template
    {year.full} | {year.abbreviated} | {year.abbreviated(n)}year | year.full | year.abbreviated
    {era.full} | {era.abbreviated} | {era.abbreviated(n)}n/a
    Note

    "Era" only applies when the CalendarIdentifier is set to the Japanese calendar. For the Japanese calendar, era is shown in the year picker.

    For the complete list of format templates and format patterns, see the Remarks section of the DateTimeFormatter class documentation.

  • YearFormatProperty
    YearFormatProperty
    YearFormatProperty
    YearFormatProperty

    Identifies the YearFormat dependency property.

    public static DependencyProperty YearFormatProperty { get; }public static DependencyProperty YearFormatProperty { get; }Public Static ReadOnly Property YearFormatProperty As DependencyPropertypublic static DependencyProperty YearFormatProperty { get; }

    Property Value

  • YearVisible
    YearVisible
    YearVisible
    YearVisible

    Gets or sets a value that indicates whether the year selector is shown.

    public bool YearVisible { get; set; }public bool YearVisible { get; set; }Public ReadWrite Property YearVisible As boolpublic bool YearVisible { get; set; }

    Property Value

    • bool
      bool
      bool

      True if the year selector is shown; otherwise, false. The default is true.

  • YearVisibleProperty
    YearVisibleProperty
    YearVisibleProperty
    YearVisibleProperty

    Gets the identifier for the YearVisible dependency property.

    public static DependencyProperty YearVisibleProperty { get; }public static DependencyProperty YearVisibleProperty { get; }Public Static ReadOnly Property YearVisibleProperty As DependencyPropertypublic static DependencyProperty YearVisibleProperty { get; }

    Property Value

Methods

  • ShowAtAsync(FrameworkElement)
    ShowAtAsync(FrameworkElement)
    ShowAtAsync(FrameworkElement)
    ShowAtAsync(FrameworkElement)

    Begins an asynchronous operation to show the date picker placed in relation to the specified element.

    public IAsyncOperation<IReference<DateTime>> ShowAtAsync(FrameworkElement target)public IAsyncOperation<IReference<DateTime>> ShowAtAsync(FrameworkElement target)Public Function ShowAtAsync(target As FrameworkElement) As IAsyncOperation( Of IReferenceDateTime )public IAsyncOperation<IReference<DateTime>> ShowAtAsync(FrameworkElement target)

    Parameters

    Returns

    • An asynchronous operation

Events

  • DatePicked
    DatePicked
    DatePicked
    DatePicked

    Occurs when a date has been picked by the user.

    public event TypedEventHandler DatePickedpublic event TypedEventHandler DatePickedPublic Event DatePickedpublic event TypedEventHandler DatePicked

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.ActivatableAttribute
Windows.Foundation.Metadata.ContractVersionAttribute
Windows.Foundation.Metadata.MarshalingBehaviorAttribute
Windows.Foundation.Metadata.StaticAttribute
Windows.Foundation.Metadata.StaticAttribute
Windows.Foundation.Metadata.ThreadingAttribute
Windows.Foundation.Metadata.WebHostHiddenAttribute

Details

Assembly

Windows.UI.Xaml.Controls.dll