PathIcon

PathIcon enables you to use completely custom vector artwork as your icon (without having to create your own font with custom glyphs and ship it with your app). It has a single property called Data that can be set to a Geometry. Geometries are covered in Chapter 15, “Vector Graphics,” but here’s an example of custom vector data that produces the result in Figure 9.7:

<AppBarButton Label="Overlapping Triangles">   <AppBarButton.Icon>     <PathIcon Data="M 10,10 L 10,25 L 25,25 Z M 30,10 L 10,30 L 30,30 Z"/>   </AppBarButton.Icon> </AppBarButton>

Image

FIGURE 9.7 An AppBarButton using PathIcon to get a completely ...

Get Universal Windows® Apps with XAML and C# Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.