QAT icons are not monochrome when MetroLightRoyal is used

Ribbon for WPF Forum

Posted 3 years ago by Stefan Koell
Version: 16.1.0633
Avatar

Hi,

I studied the docs and according to the help file the conversion to monochrome icon is performed automatically. In my case the color icon is added to the QAT. Do I need to do something to make this work? Btw, I'm not assigning a PNG to the icon, I'm using a vector icon (converted from SVG to XAML). Could this be the issue?

Thanks,

Stefan

Comments (4)

Posted 3 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Stefan,

That is correct, it will only alter BitmapSource (raster) images or BitmapSource image portions that are nested in DrawingVisuals.  The latter allows you to have a raster image for say a highlight pen and then use a vector portion to render the actual pen color.  When that converts to monochrome, the highlight pen raster image portion will be pure white but the pen color will still show through for the vector portion.

We are updating our documentation for the next maintenance release to clarify that it's for BitmapSource images only.

For QAT controls that use vector images, you'd have to supply your own monochrome versions.

If you have any suggestions in this area, please feel free to post them.


Actipro Software Support

Posted 3 years ago by Stefan Koell
Avatar

Thanks for the clarification. A couple of follow up questions:

Do you have plans to support XAML vector (DrawingImages) as well in the future? Providing monochrome versions for each icon is a huge task. I also noticed that disabled images are not monochrome (regardless if vector or bitmap). In Devexpress I had a workaround using a nuget called GrayscaleEffect (based on a PixelShader):

https://www.nuget.org/packages/GrayscaleEffect/

There's quite some information about the missing grayscale effect for disabled icons in WPF:

https://channel9.msdn.com/Blogs/ContinuumNews/Disable-Buttons-with-a-Grayscale-Effect-in-WPF

http://stackoverflow.com/questions/11305577/grey-out-image-on-button-when-element-is-disabled-simple-and-beautiful-way

It would be awesome if you can provide the same functionality out of the box in your UI controls (ribbon/toolbar/menu/buttons/etc). This appruach could also be used for the QAT icons with a different shader effect. Having this out of the box, would be very helpful.

cheers,
Stefan

Posted 3 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Stefan,

We didn't have plans to add monochrome logic to vector images but if you send us a small sample to our support address that shows some vector images and how you use them in Ribbon, we can take a look at how hard that would be.  In your email, please reference this thread and rename the .zip file extension of what you send so it doesn't get spam blocked.

For grayscaling, we currently just set the opacity of images on disabled controls.  Older versions of Office used to do that too, but now it looks like they may also be applying grayscaling.  We can't do effects since I believe those don't work in XBAPs and have security issues (we had to remove all those in the past and find other ways to mimic their effects).  The last link you posted is one valid way of doing grayed out images though.  We'd need to make a custom Image-based control and replace that in all our control templates.


Actipro Software Support

Posted 3 years ago by Stefan Koell
Avatar

Email sent. Please let me know if you haven't received it.

Regards,

Stefan

The latest build of this product (v2019.1 build 0681) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.