views:

21

answers:

1

Is it possible to update the zindex property of an element via a trigger in the xaml?

I thought something like below would work, but it's not:

<i:EventTrigger EventName="MouseEnter">
     <ei:ChangePropertyAction TargetObject="{Binding ElementName=Grid}"  PropertyName="Canvas.ZIndex" Value="999"/>
</i:EventTrigger>

thanks, voss.

A: 

You should try to describe PropertyName as "(Canvas.ZIndex)" since ZIndex is attached property. (see http://msdn.microsoft.com/en-us/library/cc645024(VS.95).aspx)

Denis
Denis...thansk for the feedback, but I don't really follow. What are you suggesting I change this line to?
voss
PropertyName="Canvas.ZIndex"
voss
PropertyName="(Canvas.ZIndex)" <- notice the parentheses. Altou I am not even sure that ChangePropertyAction can change attached property
Denis