Sachin123
Sachin123

Reputation: 251

How to disable default keypress navigation of flipview in windows8 xaml

I am developing a windows 8 xaml application. I am using flipview control to display items and I want to disable default keypress navigation of flipview.

Upvotes: 1

Views: 204

Answers (1)

Jerry Nixon
Jerry Nixon

Reputation: 31813

Well, here's what doesn't work:

protected override void OnKeyDown(KeyRoutedEventArgs e)
{
    e.Handled = true;
    base.OnKeyDown(e);
}
protected override void OnKeyUp(KeyRoutedEventArgs e)
{
    e.Handled = true;
    base.OnKeyUp(e);
}

After some more digging, I don't see a way to intercept it.

This also doesn't work:

private void FlipView_GotFocus(object sender, RoutedEventArgs e)
{
    (sender as FlipView).Focus(Windows.UI.Xaml.FocusState.Unfocused);
}

I tried changing the template, but there's nothing there that helps.

I tried sub-classing it to a custom control, but there's nothing to override.

Without disabling the TOUCH features, I don't think this can be done.

Wow, never thought I would say that.

Upvotes: 1

Related Questions