Click or drag to resize

AppBar Icon

AppBarIcon shares the same principle with AppBarButton, you can use IconKey to specify an Icon and IsCircleVisible to indicate if a circle is around the icon.

This Icon element can be embedded into another WPF Controls such as Button.

Use AppBarIcon with other WPF Controls

The following example shows how use AppBarIcon into a Button

XAML
<Button x:Name="btnSendRequest" Click="btnSendRequest_Click"  Style="{DynamicResource FlatButtonStyle}">
    <StackPanel Orientation="Horizontal">
        <ui:AppBarIcon IconKey="appbar_arrow_right" Height="24" Width="24" IsCircleVisible="True" />
        <TextBlock Text="Send Request" Margin="{DynamicResource Thickness4444}" />
    </StackPanel>
</Button>

The button shown in the user interface by the above XAML code will be:

flatbutton

With AppBarIcon, you have the possibility to control the size with Height and Width property.

The AppBarIcon applies the Foreground color of current context, in order to keep the harmony with another element. You can not change the color by yourself.

Following is an example used on ToggleButton, without circle around.

optionbutton

To archive this, you can use the following XAML code as example. This time it has no circle with Height and Width = 16 points.

XAML
<ToggleButton HorizontalAlignment="Center" x:Name="btnSettings" Style="{DynamicResource ToolbarToggleButtonStyle}" ToolTip="Options" >
    <StackPanel Orientation="Horizontal">
        <ui:AppBarIcon IconKey="appbar_settings" Height="16" Width="16" />
        <TextBlock Text="Options" Margin="{DynamicResource Thickness4444}" />
    </StackPanel>
</ToggleButton>
See Also

Reference

Other Resources

[00e97994-e9e6-46e0-b420-5be86b2f8270]