AppBarToggleButton

Just like the relationship between AppBarButton and Button, AppBarToggleButton is a ToggleButton that matches the expected style of app bar buttons. It defines the same Label, Icon, and IsCompact properties discussed in the “AppBarButton” section, but it inherits the sticky IsChecked behavior from ToggleButton.

Fortunately, unlike its ToggleButton base class, this control has a meaningful visual representation of its indeterminate state, should you decide to enable its three-state mode. Figure 9.10 shows the following three AppBarToggleButtons, after the first one is clicked once and the last one is clicked twice:

<StackPanel Orientation="Horizontal">   <AppBarToggleButton Label="Checked" Icon ...

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.