fix: fix focus visual.

This commit is contained in:
rabbitism
2024-01-14 23:17:02 +08:00
parent fbdef7d758
commit 30241f3f22

View File

@@ -197,6 +197,7 @@ public abstract class NumericUpDown : TemplatedControl
private void OnDragPanelPointerPressed(object sender, PointerPressedEventArgs e) private void OnDragPanelPointerPressed(object sender, PointerPressedEventArgs e)
{ {
_point = e.GetPosition(this); _point = e.GetPosition(this);
_textBox?.Focus();
} }
private void OnDragPanelPointerReleased(object sender, PointerReleasedEventArgs e) private void OnDragPanelPointerReleased(object sender, PointerReleasedEventArgs e)
@@ -476,7 +477,6 @@ public abstract class NumericUpDownBase<T>: NumericUpDown where T: struct, IComp
{ {
try try
{ {
// TODO
var newValue = ConvertTextToValue(text); var newValue = ConvertTextToValue(text);
if (EmptyInputValue is not null && newValue is null) if (EmptyInputValue is not null && newValue is null)
{ {