How the icons don't change with the global theme?

WPF Studio, Themes, and Shared Library for WPF Forum

Posted 9 months ago by Sunshine - Appeon
Version: 22.1.0
Avatar

In some scenarios, I hope that some of the icons I set will not follow the global theme changes. How can I do this?

For example, I use Button in the code.

 <ar:Button ImageSourceSmall="{Binding Icon}"/>

How to make my Icon not change dynamically?

Comments (1)

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

Hello,

You can use the CanAdapt attached property on an ImageSource or elements within an ImageSource (if it's a DrawingImage) to prevent adaptation as described in this documentation topic.  Please note you set the attached property on the ImageSource itself (or within), and NOT on the control hosting the image.


Actipro Software Support

The latest build of this product (v22.1.4) was released 25 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.