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

WPF Studio, Themes, and Shared Library for WPF Forum

Posted 2 years 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 2 years 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 (v24.1.2) was released 2 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.