More Icons for AppBarButtons

Hi all,

Quick post about something really useful and simple, once you know where to look.

The AppBarButton, which you no doubt use all the time, has an Icon property which uses the AppbarIcon enumeration.

Firstly; to see what is available in this enumeration look here.

Secondly; it is still somewhat limited and in my experience the “Share” value doesn’t work anyway.  So what to do?

Easy; you override the ContentControl like this:

<AppBarButton Label=”Share” >
<AppBarButton.Icon>
<FontIcon FontFamily=”Segoe MDL2 Assets” Glyph=”&#xE72D;”/>
</AppBarButton.Icon>
</AppBarButton>

You can now set it to any font symbol you like, Segoe MDL2 Assets being the UWP Standard of course (so you know it is always there!) and this example uses the Share icon.

Build away!
Rob.

Leave a Reply

Your email address will not be published. Required fields are marked *