修复 DatePicker DateRangePicker 日历按钮无响应的问题

https://github.com/irihitech/Ursa.Avalonia/issues/292
This commit is contained in:
杨劼
2024-07-18 20:03:49 +08:00
parent d24ced3b0d
commit b8c057dee3
2 changed files with 2 additions and 2 deletions

View File

@@ -82,7 +82,7 @@ public class DatePicker: DatePickerBase, IClearControl
_textBox = e.NameScope.Find<TextBox>(PART_TextBox);
_calendar = e.NameScope.Find<CalendarView>(PART_Calendar);
Button.ClickEvent.AddHandler(OnButtonClick, RoutingStrategies.Tunnel, true, _button);
Button.ClickEvent.AddHandler(OnButtonClick, RoutingStrategies.Bubble, true, _button);
GotFocusEvent.AddHandler(OnTextBoxGetFocus, _textBox);
TextBox.TextChangedEvent.AddHandler(OnTextChanged, _textBox);
PointerPressedEvent.AddHandler(OnTextBoxPointerPressed, RoutingStrategies.Tunnel, false, _textBox);

View File

@@ -128,7 +128,7 @@ public class DateRangePicker : DatePickerBase
_startTextBox = e.NameScope.Find<TextBox>(PART_StartTextBox);
_endTextBox = e.NameScope.Find<TextBox>(PART_EndTextBox);
Button.ClickEvent.AddHandler(OnButtonClick, RoutingStrategies.Tunnel, true, _button);
Button.ClickEvent.AddHandler(OnButtonClick, RoutingStrategies.Bubble, true, _button);
GotFocusEvent.AddHandler(OnTextBoxGetFocus, _startTextBox, _endTextBox);
TextBox.TextChangedEvent.AddHandler(OnTextChanged, _startTextBox, _endTextBox);
PointerPressedEvent.AddHandler(OnTextBoxPointerPressed, RoutingStrategies.Tunnel, false, _startTextBox, _endTextBox);