Here is a quick technique to bind a ViewModel property to a VisualStateManager state. It uses Triggers along with the GoToStateAction TriggerAction:
XAML
<i:Interaction.Triggers>
<ei:DataTrigger Binding="{Binding Model.Prop}" Value="Value1">
<ei:GoToStateAction StateName="State1"/>
</ei:DataTrigger>
<ei:DataTrigger Binding="{Binding Model.Prop}" Value="Value2">
<ei:GoToStateAction StateName="State2"/>
</ei:DataTrigger>
</i:Interaction.Triggers>
Do you have a question or a suggestion about this post? Contact me!