I have the following Style for my RibbonToggleButton
<Style TargetType="RibbonToggleButton">
<Style.Triggers>
<Trigger Property="ToggleButton.IsChecked" Value="True">
<Setter Property="SmallImageSource" >
<Setter.Value>
<Image Source="Images/small_checked.png"/>
</Setter.Value>
</Setter>
</Trigger>
<Trigger Property="IsChecked" Value="False">
<Setter Property="SmallImageSource" >
<Setter.Value>
<Image Source="Images/small_unchecked.png"/>
</Setter.Value>
</Setter>
</Trigger>
</Style.Triggers>
</Style>
I also tried the full path for the SmallImageSource property:
"System.Windows.Media.ImageSource.SmallImageSource"
But i always get this error:
Error 1 Cannot resolve the Style Property 'SmallImageSource'. Verify that the owning type is the Style's TargetType, or use Class.Property syntax to specify the Property. Line ....
Update "Solution"
<RibbonToggleButton.Style>
<Style>
<!-- set the affected properties only here -->
<Setter Property="SmallImageSource" Value="Images/small_unchecked.png"/>
<Setter Property="LargeImageSource" Value="Images/large_unchecked.png"/>
<Style.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter Property="SmallImageSource" Value="Images/small_checked.png"/>
<Setter Property="LargeImageSource" Value="Images/large_checked.png"/>
</Trigger>
</Style.Triggers>
</Style>
</RibbonToggleButton.Style>
Have you tried adding a target type to your style?
So it would be <Style TargetType="RibbonToggleButton">
instead of just
<Style>