feat: initialize panel.
This commit is contained in:
28
src/Ursa/Controls/Panels/UrsaTimePickerPanel.cs
Normal file
28
src/Ursa/Controls/Panels/UrsaTimePickerPanel.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Controls.Primitives;
|
||||
using Avalonia.Input;
|
||||
|
||||
namespace Ursa.Controls.Panels;
|
||||
|
||||
/// <summary>
|
||||
/// The panel to display items for time selection
|
||||
/// </summary>
|
||||
public class UrsaTimePickerPanel: Panel
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines whether the panel is looping.
|
||||
/// This is ont applicable for columns like year and AM/PM designation.
|
||||
/// </summary>
|
||||
public static readonly StyledProperty<bool> IsLoopingProperty = AvaloniaProperty.Register<UrsaTimePickerPanel, bool>(
|
||||
nameof(IsLooping));
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of <see cref="IsLoopingProperty"/>.
|
||||
/// </summary>
|
||||
public bool IsLooping
|
||||
{
|
||||
get => GetValue(IsLoopingProperty);
|
||||
set => SetValue(IsLoopingProperty, value);
|
||||
}
|
||||
}
|
||||
@@ -32,4 +32,13 @@ public class TimePicker: TemplatedControl
|
||||
get => GetValue(SelectedTimeProperty);
|
||||
set => SetValue(SelectedTimeProperty, value);
|
||||
}
|
||||
|
||||
public static readonly StyledProperty<bool> NeedConfirmProperty = AvaloniaProperty.Register<TimePicker, bool>(
|
||||
nameof(NeedConfirm));
|
||||
|
||||
public bool NeedConfirm
|
||||
{
|
||||
get => GetValue(NeedConfirmProperty);
|
||||
set => SetValue(NeedConfirmProperty, value);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user