
Hello Actipro,
I have an issue that can be reproduced also in your Sample app:
- Open the "Document Editor (similar to Word)" external sample.
- Change the theme from "Metro Black" to "Office Colorful > Red Accent"
=> Note that the Save icon in the QAT of the external sample changed from magenta color to some kind of white color
In my case I do not use a static definition as you:
<ribbon:Button Id="Save" Command="ApplicationCommands.Save" />
but the items are added this way:
RibbonButton button = new RibbonButton
{
Id = commandModel.Id,
ImageSourceLarge = renderTargetBitmap,
ImageSourceSmall = renderTargetBitmap,
Command = commandModel.Command,
CommandParameter = commandModel.CommandParameter
};
QuickAccessToolBarItems.Add(button);
where renderTargetBitmap
is
RenderTargetBitmap renderTargetBitmap = converter.Convert(null, null, commandModel.ResourceName, null) as RenderTargetBitmap;
and ResourceName is a style resource:
<Style x:Key="ThemeRed" TargetType="{x:Type ContentControl}">
<Setter Property="ContentTemplate">
<Setter.Value>
<DataTemplate>
<Grid>
<Path Data="M0,0L32,0 32,32 0,32z" Stroke="White" StrokeThickness="1.25"
Stretch="Uniform" Fill="Red" Margin="5" RenderTransformOrigin="0.5,0.5" />
</Grid>
</DataTemplate>
</Setter.Value>
</Setter>
How to achieve the color of my button be preserved?