Deniz Cetinalp
Deniz Cetinalp

Reputation: 911

How to add effect inside ItemContainerStyle

I have an effect that I normally use like this:

<Image.Effect>
   <effects:HueBrightnessContrastSaturationEffect Hue="{Binding hue}"/>
</Image.Effect>

Now I need to apply the effect inside the itemContainerStyle section. Im trying to add Effect as a Property but I get "Effect" is not recognized or is not accessible.

Upvotes: 0

Views: 115

Answers (1)

har07
har07

Reputation: 89285

Something like this should work fine :

<Foo.ItemContainerStyle>
    <Style TargetType="Image">
        <Setter Property="Effect">
            <Setter.Value>
                <effects:HueBrightnessContrastSaturationEffect Hue="{Binding hue}"/> 
            </Setter.Value>
        </Setter>
    </Style>
</Foo.ItemContainerStyle>

Upvotes: 1

Related Questions