Browse Source

Move CalendarDatePickerFormat into its own file

pull/7958/head
robloo 5 years ago
parent
commit
764e28f8d8
  1. 24
      src/Avalonia.Controls/Calendar/CalendarDatePicker.cs
  2. 7
      src/Avalonia.Controls/Calendar/CalendarDatePickerDateValidationErrorEventArgs.cs
  3. 31
      src/Avalonia.Controls/Calendar/CalendarDatePickerFormat.cs

24
src/Avalonia.Controls/Calendar/CalendarDatePicker.cs

@ -15,30 +15,6 @@ using Avalonia.Interactivity;
namespace Avalonia.Controls
{
/// <summary>
/// Specifies date formats for a
/// <see cref="T:Avalonia.Controls.CalendarDatePicker" />.
/// </summary>
public enum CalendarDatePickerFormat
{
/// <summary>
/// Specifies that the date should be displayed using unabbreviated days
/// of the week and month names.
/// </summary>
Long = 0,
/// <summary>
/// Specifies that the date should be displayed using abbreviated days
/// of the week and month names.
/// </summary>
Short = 1,
/// <summary>
/// Specifies that the date should be displayed using a custom format string.
/// </summary>
Custom = 2
}
[TemplatePart(ElementButton, typeof(Button))]
[TemplatePart(ElementCalendar, typeof(Calendar))]
[TemplatePart(ElementPopup, typeof(Popup))]

7
src/Avalonia.Controls/Calendar/CalendarDatePickerDateValidationErrorEventArgs.cs

@ -1,4 +1,9 @@
using System;
// (c) Copyright Microsoft Corporation.
// This source is subject to the Microsoft Public License (Ms-PL).
// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
// All other rights reserved.
using System;
namespace Avalonia.Controls
{

31
src/Avalonia.Controls/Calendar/CalendarDatePickerFormat.cs

@ -0,0 +1,31 @@
// (c) Copyright Microsoft Corporation.
// This source is subject to the Microsoft Public License (Ms-PL).
// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
// All other rights reserved.
namespace Avalonia.Controls
{
/// <summary>
/// Specifies date formats for a
/// <see cref="T:Avalonia.Controls.CalendarDatePicker" />.
/// </summary>
public enum CalendarDatePickerFormat
{
/// <summary>
/// Specifies that the date should be displayed using unabbreviated days
/// of the week and month names.
/// </summary>
Long = 0,
/// <summary>
/// Specifies that the date should be displayed using abbreviated days
/// of the week and month names.
/// </summary>
Short = 1,
/// <summary>
/// Specifies that the date should be displayed using a custom format string.
/// </summary>
Custom = 2
}
}
Loading…
Cancel
Save