I am using <MaterialDesign:PackIcon Kind="BugOutline"/> and trying triggers on the same. Motive is to change border color of the MaterialDesign:PackIcon Kind="BugOutLine" on focus
<Button Margin="10 5" Command={Binding AddBugCommand} ToolTip="Add" Style="{StaticResource MaterialDesignIconButton}">
<Material:PackIcon Kind="BugOutline"/>
</Button>
and I have done the following:
<MaterialDesign:PackIcon.Style>
<Style TargetType="MaterialDesign:PackIcon">
<Style.Triggers>
<Triggers Property="IsFocused" Value="True">
<Setter Property="BorderBrush" Value=""Yellow"/>
<Setter Propety="BorderThickness" Value="2"/>
</Triggers>
</Style.Trigers>
</Style>
</MaterialDesign:PackIcon.Style>
I also tried creating trigger for button itself by extending already existing style of the button. But it didn't work.
<Button.Style>
<Style TargetType="{x:Type Button}" BasedOn={StaticResource MaterialDesignIconButton}>
<Style.Triggers>
<Trigger Property="IsFocused" Value="True">
<Setter Property="BorderBrush" Value="Yellow"/>
<Setter Property="BorderThickness" Value="2"/>
<Trigger>
</Style.Triggers>
</Style>
</Button.Style>
Below you have an example solution.
I binding the content element (in your case is PackIcon) with the foreground of the button
I created a style with triggers that change the foreground of the button based on states (IsMouseOver,IsKeyboardFocusWithin).
If you want to adapt my example, please don't forget to add the BaseOn property to the style, change Path to PackIcon and adjust the necessary brushes when is triggered.