Hello,
Welcome to Microsoft Q&A!
You could handle the UIElement.PreviewKeyDown Event to prevent the arrow keys.
Like this:
<ScrollViewer x:Name="Zoom" PreviewKeyDown="Zoom_PreviewKeyDown" Grid.Column="1" Grid.Row="1" ZoomMode="Enabled" HorizontalScrollMode="Enabled" VerticalScrollMode="Enabled" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
Code behind:
private void Zoom_PreviewKeyDown(object sender, KeyRoutedEventArgs e)
{
if (e.Key == Windows.System.VirtualKey.Up || e.Key == Windows.System.VirtualKey.Down || e.Key == Windows.System.VirtualKey.Left || e.Key == Windows.System.VirtualKey.Right)
{
e.Handled = true;
}
}
Thank you.
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.