here I have an image (I want to display it as an icon in my list). and I have to change its color when it's selected.
I tried this solution before: https://stackoverflow.com/a/42794551/14564778
With this codes:
<Grid Margin="5,0,0,0">
<Image Height="25" Width="25" Source="{Binding ItemImageSource}" RenderOptions.BitmapScalingMode="Fant"/>
<Rectangle Height="25" Width="25" Fill="{StaticResource orangePink}" RenderOptions.BitmapScalingMode="Fant">
<Rectangle.OpacityMask>
<ImageBrush ImageSource="{Binding ItemImageSource}"/>
</Rectangle.OpacityMask>
</Rectangle>
</Grid>
The problem I got is the shape of the image is not consistent when I apply the new color
Note that the images that I use are high resolution images.
so, If anyone can help me with codes or third-party library or another way. I will be happy for this.
thx...