feat: support left right navigation.

This commit is contained in:
rabbitism
2024-03-09 17:38:51 +08:00
parent bfaee9051f
commit 99cae144e4

View File

@@ -165,5 +165,15 @@ public class VerificationCode: TemplatedControl
_currentIndex--;
_itemsControl?.ContainerFromIndex(_currentIndex)?.Focus();
}
else if(e.Key == Key.Left && _currentIndex > 0)
{
_currentIndex--;
_itemsControl?.ContainerFromIndex(_currentIndex)?.Focus();
}
else if(e.Key == Key.Right && _currentIndex < Count)
{
_currentIndex++;
_itemsControl?.ContainerFromIndex(_currentIndex)?.Focus();
}
}
}