
Hi,
is there a way to add my own shader effect to QAT button images or customize the appearance of these buttons
when using the Office 2016 themes?
I don't want the white mask, but something else...
Thank you,
Gergely
Hi,
is there a way to add my own shader effect to QAT button images or customize the appearance of these buttons
when using the Office 2016 themes?
I don't want the white mask, but something else...
Thank you,
Gergely
Hello,
I believe you can disable that effect by setting the attached ImageSourceContentConverter.CanConvertToMonochrome property to false on the image. There isn't a way to intercept that behavior otherwise with custom logic though.
Hi,
could you provide some sample code?
I tried to set this property everywhere but had no luck.
It seems when a button is added to the QAT above, it's ImageSourceSmall is automatically replaced with a WriteableBitmap, which is I suppose the monochrome image. I couldn't prevent this behavior. And since there is no original bitmap on the button, I can only show the monochrome one.
Thanks.
Hello,
If you want it disabled on a specific image, you could load the image like this:
var newImage = new BitmapImage(new Uri("pack://application:,,,/SampleBrowser;component/Resources/Images/New16.png", UriKind.RelativeOrAbsolute));
ImageSourceContentConverter.SetCanConvertToMonochrome(newImage, false);
If you want it disabled on all images, you can set this in your application's Resources:
<system:Boolean x:Key="{x:Static themes:AssetResourceKeys.WindowTitleBarUseAccentBooleanKey}">False</system:Boolean>
Thank you!
Please log in to a validated account to post comments.