我正在开发一个Windows 8 xaml应用程序。我正在使用flipview控件来显示项目,我想禁用flipview的默认按键导航。
答案 0 :(得分:1)
嗯,这是不起作用的:
protected override void OnKeyDown(KeyRoutedEventArgs e)
{
e.Handled = true;
base.OnKeyDown(e);
}
protected override void OnKeyUp(KeyRoutedEventArgs e)
{
e.Handled = true;
base.OnKeyUp(e);
}
经过多次挖掘后,我看不到拦截它的方法。
这也不起作用:
private void FlipView_GotFocus(object sender, RoutedEventArgs e)
{
(sender as FlipView).Focus(Windows.UI.Xaml.FocusState.Unfocused);
}
我尝试更改模板,但没有任何帮助。
我尝试将其子类化为自定义控件,但没有什么可以覆盖。
在不禁用TOUCH功能的情况下,我认为不能这样做。
哇,从没想过我会这么说。