Custom ShaderEffect for QAT button images (Office2016 theme)

Posted 12 days ago by Avatar Gergely Bacsó


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,

Information The latest build of this product (2018.1 build 0672) was released 2 months ago, which was before this thread was created.

Comments (4)

Posted 11 days ago by Actipro Software Support - Cleveland, OH, USA


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.

Actipro Software Support
Posted 10 days ago by Gergely Bacsó


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.


Posted 10 days ago by Actipro Software Support - Cleveland, OH, USA


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>

Actipro Software Support
Posted 9 days ago by Gergely Bacsó

Thank you!

Add a Comment

Please log in to a validated account to post comments.