Segoe UI Symbol Icons and WinRT Button Styling

For button styling in my WinRT app, I would run the Character Map utility, look up the Unicode value of an appropriate looking symbol in the Segoe UI Symbol font family, and specify that value as the content of my button.

<Button Content="& #xE109;" FontFamily="Segoe UI Symbol"/>

It seemed there had to be a better way to access standard icons. It seems that Microsoft provides the standard icons in a symbol enumeration.

So to use the standard icon for “add”, you can style your button like so:

<Button>
    <Button.Content>
        <SymbolIcon Symbol="Add"/>
    </Button.Content>
</Button>

Here are Microsoft’s Guidelines for Segoe UI Symbol icons.

Advertisements