What is the replacement for DataTrigger in Silverlight

前端 未结 4 1311
南笙
南笙 2020-12-03 05:26

This is my scenario.

I have 2 Properties. Type and State.

Type is an Enum with 3 values eg, ball, car, arrow. State is an int which would accept 3 state valu

4条回答
  •  南笙
    南笙 (楼主)
    2020-12-03 05:48

    To expand on Mike Post's post here's the XAML in case you don't have Blend.

    You need to add references to Microsoft.Expression.Interactions and System.Windows.Interactivity.

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

    Then in your control, at the same level as the VisualStateManager put this:

    
        
            
        
    
    

提交回复
热议问题