Toolbar button images in Metro Dark theme show a light background

WPF Studio, Themes, and Shared Library for WPF Forum

Posted 5 months ago by Paul Cutting
Version: 22.1.0
Platform: .NET 5.0
Environment: Windows 10 (64-bit)
Avatar

Hi,

I have a basic WPF toolbar added to my application which is themed with the Metro Dark theme.  I have 16x16 pixel PNG images with transparent backgrounds that I'm placing into regular WPF buttons in the toolbar.  However, the images are not getting the dark look that I would have expected.  The transparent part of the image displays with a very light gray color.  I have `ThemeManager.AreNativeThemesEnabled = true;` set in `App.OnStartup(...)`.  Everything else in the application is correctly themed as I would expect.

I have attempted to follow the "MetroIdeWindow" example, which also display buttons with transparent images, where it appears to work fine, but no luck in my case.

Any ideas what I might be doing wrong please, or anything I should try?

On a completely unrelated note, is it possible to paste images into these forum posts?  A picture is worth a thousand words after all! :-)

Comments (1)

Posted 5 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Paul,

Our logic to apply chromatic adaptation to images for dark themes needs to be activated via the ImageProvider class.  You can see a couple lines at the start of our sample app's App.OnStartup code that activates those features.  There are also described in this documentation topic.

I'm sorry but our forums don't currently support posting of images inline.


Actipro Software Support

The latest build of this product (v22.1.2) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.