WinRT: introducing the AppBarHint control

Windows 8.1 is has a lot of improvements in the OS, for XAML and HTML developers but also changes some paradigms introduced with the release of Windows  8. One of them is to make more obvious UI elements that were hidden behind gestures users could miss.

If you take a look at the music app for example you will notice that the search bar is now always visible (in the top left corner):

xbox music 8.1

Whereas in the original version it was accessible only from the search charm (thus harder to find):

xbox music 8.0

In the mail app, many actions were hidden in the bottom application bar and the 8.1 version now displays a visual indicator that there is something hidden here:

app bar

With a bottom bar with “…” in the bottom-right corner:

app bar hint

In the upcoming version of 2Day for Windows 8, I decided to follow this path and I built a simple control I called the AppBarHint control for this exact purpose. The code is more than trivial but I thought it worth a blog post more because of the idea of using it rather than the actual code.

2day appbar hint 12day appbar hint 2

The control is actually just a Button with a custom template applied to it. The source code is available on GitHub. Here is the template applied to the Button:



WinRT 8.1: this is why you will use the Properties pane in Visual Studio

If like me you are a XAML lover they is good chance you spend most of your time writing your XAML by hand in Visual Studio.  From the day I started working in XAML I rarely use the Visual Studio designer (even thought it has been improved with each release of Visual Studio). Today, I’m sharing a very good reason to use the Properties pane if you are targeting Windows 8.1 in Visual Studio 2013 !

Meet the new AppBarButton control

Windows 8.1 introduces a new set of controls (full list here on MSDN), among them there is the AppBarButton control:


This control help designing an application bar with the proper looks for the buttons in it. In Windows 8, you could specify the icon of a button by using the appropriate code of the Segoe UI Symbol font. For example, using this XAML

    FontFamily="Segoe UI Symbol"/>

Will produce this kind of icon:


It was kind of cumbersome to look for the appropriate code on MSDN and type it in XAML. This is the good part about the new AppBarButton control and the properties pane which make it works nicely together because the editor handles the Symbol property perfectly:


Now I have at least one good reason to use the designer !