Compiled Experience

What's new in Windows 10 - Key Accelerators

02 Apr 2015 by Nigel Sampson

Microsoft have finally started to show off what’s available in Windows 10 for us app developers. Over the next few days we can start to take a look at some of these changes and what it can mean. Today we’ll look at what you can do with the Windows.UI.Xaml.KeyAccelerator class.

Disclaimer

This was written using the initial release of the Windows 10 Developer Tools running on Windows 10 build 10041 and things will mostly change before final release. I’ll try to come back and keep these posts up to date as time goes on.

Key Accelerator

Keyboard shortcuts aren’t thought much about by app developers, we typically envisage our app running on a touch enabled tablet or phone. Although Windows 8 apps would run with no problems on desktop devices they weren’t thought of as a target. Windows 10 by supporting Desktop Mode and the Continuum feature should drive more usage of Windows Apps on the desktop. In these scenarios we as developers should think about keyboard shortcuts and how they can increase the productivity of their users.

So Windows 10 adds the Windows.UI.Xaml.KeyAccelerator class which provides a way to declare keyboard shortcuts for a Windows.UI.Xaml.Controls.Page in your xaml as you can see below.