Universal Windows Platform – Tutorial Insider – Access Keys



comentsys.wordpress.com today features a Universal Windows Platform tutorial using Access Keys. This allows you to create a CommandBar with Access Keys that use the Alt key on the keyboard to then show on-screen which Keyboard key to press to perform the task of the button on the CommandBar.


In the latest Windows 10 update it’s much easier to use Access Keys as all that’s needed is to set the AccessKey property on a Button and that’s it – it used to be a bit more complicated to display the necessary ToolTip but that’s no longer the case, the example will show a MessageDialog to confirm which option has been selected whether Alt plus a key on the Keyboard has been used or the Button has been selected to show that it will perform the same function.

Behind the Scenes

An earlier version of this tutorial was more complex with code to create the necessary ToolTip and with an Event for when they were to be shown or hidden but thanks to latest changes in Windows 10 this resulted in a much simpler way of doing it and the tutorial was changed accordingly – this can be the case with updates that features that took a lot of code or functionality to do become easier as these become more commonly used by developers and actually ended up being the simplest tutorial which is usually reserved for the first one, another thing to remember about programming is if there’s a simpler way of doing something then that’s the better and quicker way and this tutorial really demonstrated that with just a new Property to enable Access Keys and to show the ToolTip for them rather than a bunch of code!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s