0

I have a trigger in WPF, i want to use the same kind in Silverlight version, can any one please help me to write the below sample WPF trigger into Silverlight?

 <ControlTemplate.Triggers> <Trigger Property="pop:Indicator.HaveResults" Value="True"> <Setter Property="Visibility" TargetName="PART_Symbol" Value="Visible"/> <Setter Property="Opacity" TargetName="EditIndicator" Value="0" /> </Trigger> </ControlTemplate.Triggers> 

Thank you in advance.

1 Answer 1

2

I'm not sure that specifically in this case a simple binding won't do the job better, but, I suspect he following should work:

Add references to the assemblies in the following namespaces (and the namespace)

xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" xmlns:ei="clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions" 

and then

<i:Interaction.Triggers> <ei:DataTrigger Binding="{Binding Indicator.HaveResults}" Value="True"> <ei:DataTrigger.Actions> <ei:ChangePropertyAction TargetName="X" PropertyName="Y" Value="Z"/> </ei:DataTrigger.Actions> </ei:DataTrigger> </i:Interaction.Triggers> 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.