This is a migrated thread and some comments may be shown as answers.

Contrast and Transparent

2 Answers 43 Views
ImageEditor
This is a migrated thread and some comments may be shown as answers.
ADM-IT Denis Pujdak
Top achievements
Rank 1
ADM-IT Denis Pujdak asked on 31 Mar 2014, 01:07 PM
I have the icon in the color="#333333" and the background="Transparent". I wanted to change the color of my icon to white. Look what I received. I lack color fill effect so I used the contrast.

<Image Width="20" Height="20" Margin="0,0,5,0" VerticalAlignment="Center"
    Cursor="Hand" Source="/MyProject.Res;component/Img/user-32.png" Stretch="Fill">
    <Image.Effect>
        <ShaderEffects:ContrastAdjustEffect Brightness="1"/>
    </Image.Effect>
</Image>

In my opinion transparent should not fill the color when do contrast.

2 Answers, 1 is accepted

Sort by
0
ADM-IT Denis Pujdak
Top achievements
Rank 1
answered on 31 Mar 2014, 01:28 PM
I found solution.

<Rectangle Fill="White" Width="20" Height="20" Margin="0,0,5,0" VerticalAlignment="Center" Cursor="Hand">
    <Rectangle.OpacityMask>
        <ImageBrush ImageSource="/MyProject.Res;component/Img/user-32.png"/>
    </Rectangle.OpacityMask>
</Rectangle>
0
Todor
Telerik team
answered on 03 Apr 2014, 09:02 AM
Hello Denis,

I'm glad that you already find a working solution for the problem.
As an alternative I can suggest you to use a Path instead of Rectangle and the image, if it possible of course. 

If you have any further assistance, please do not hesitate to contact us again.


Regards,
Todor
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
ImageEditor
Asked by
ADM-IT Denis Pujdak
Top achievements
Rank 1
Answers by
ADM-IT Denis Pujdak
Top achievements
Rank 1
Todor
Telerik team
Share this question
or