我创建了windows通用应用。我想为AppBarButton添加快捷方式。可能吗?我在网络上没有找到任何关于它的信息。
答案 0 :(得分:1)
我解决了这个问题。这个article和article帮助了我。如果没有控制输入可以使用此代码:
// Listen to the window directly so focus isn't required
Window.Current.CoreWindow.Dispatcher.AcceleratorKeyActivated +=
CoreDispatcher_AcceleratorKeyActivated;
Window.Current.CoreWindow.PointerPressed += this.CoreWindow_PointerPressed;
这是[{3}}使用的AcceleratorKeyActivated。