FetFrumos
FetFrumos

Reputation: 5944

Windows universal app and hot keys

I create windows universal app. I want to add shortcuts to AppBarButton. Is it possible? I did not find anything about it on the network.

Upvotes: 0

Views: 531

Answers (1)

FetFrumos
FetFrumos

Reputation: 5944

I solved this question. This article and this article help me. If there is no control input can be used this code:

// Listen to the window directly so focus isn't required
Window.Current.CoreWindow.Dispatcher.AcceleratorKeyActivated +=
       CoreDispatcher_AcceleratorKeyActivated;

Window.Current.CoreWindow.PointerPressed += this.CoreWindow_PointerPressed;

This is example used AcceleratorKeyActivated .

Upvotes: 1

Related Questions