修复 DatePicker DateRangePicker 日历按钮无响应的问题
https://github.com/irihitech/Ursa.Avalonia/issues/292
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user