diff --git a/src/Ursa.Themes.Semi/Controls/TimePicker.axaml b/src/Ursa.Themes.Semi/Controls/TimePicker.axaml
index ab05067..57871f9 100644
--- a/src/Ursa.Themes.Semi/Controls/TimePicker.axaml
+++ b/src/Ursa.Themes.Semi/Controls/TimePicker.axaml
@@ -108,6 +108,7 @@
+
@@ -117,12 +118,12 @@
VerticalAlignment="Stretch">
-
+
+
IsReadonlyProperty = AvaloniaProperty.Register(
nameof(IsReadonly));
- public bool IsReadonly
- {
- get => GetValue(IsReadonlyProperty);
- set => SetValue(IsReadonlyProperty, value);
- }
+ private Button? _button;
private Popup? _popup;
private TimePickerPresenter? _presenter;
private TextBox? _textBox;
- private Button? _button;
-
+
static TimePicker()
{
@@ -81,6 +76,12 @@ public class TimePicker : TemplatedControl, IClearControl, IInnerContentControl,
picker.OnSelectionChanged(args));
}
+ public bool IsReadonly
+ {
+ get => GetValue(IsReadonlyProperty);
+ set => SetValue(IsReadonlyProperty, value);
+ }
+
public bool IsDropdownOpen
{
get => GetValue(IsDropdownOpenProperty);
@@ -150,7 +151,7 @@ public class TimePicker : TemplatedControl, IClearControl, IInnerContentControl,
protected override void OnApplyTemplate(TemplateAppliedEventArgs e)
{
base.OnApplyTemplate(e);
-
+
GotFocusEvent.RemoveHandler(OnTextBoxGetFocus, _textBox);
TextBox.TextChangedEvent.RemoveHandler(OnTextChanged, _textBox);
PointerPressedEvent.RemoveHandler(OnTextBoxPointerPressed, _textBox);
@@ -160,12 +161,12 @@ public class TimePicker : TemplatedControl, IClearControl, IInnerContentControl,
_popup = e.NameScope.Find(PART_Popup);
_presenter = e.NameScope.Find(PART_Presenter);
_button = e.NameScope.Find