2015-11-09 21 views
0

我創建Windows通用應用程序。我想添加快捷方式到AppBarButton。可能嗎?我在網絡上沒有找到任何有關它的信息。Windows通用應用程序和熱鍵

+0

請澄清一下:從我的理解,你想添加'AppBarButton's到你的'AppBar',對嗎? – Lovy

回答

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; 

這是example使用AcceleratorKeyActivated。

相關問題