MultiTrigger (checking more than one state) equivalent in VisualStateManager?
what is the equivalent of MultiTrigger option in visualStateManager? How will i check the below trigger in VisualStateManager in Blend or VS?
eg.
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="Selector.IsSelected"
Value="True" />
<Condition Property="IsMouseOver"
Value="True" />
</MultiTrigger.Conditions>
<Setter Property="StrokeThickness"
TargetName="SelectedRectangle"
Value="1" />
</MultiTrigger>
Any good tutorial available for VisualStat开发者_如何转开发eManager in Blend?
For most control templates these states are hardwired to the user interactions, so all you have to do is to create the animation in Blend for the right states.
If you want to have the same looks for 2 different states then you have to duplicate it, but it's not recommended for several reasons. Most important ones being that users won't be sure which state is which and you'll potentially introduce some bugs. In your specific case I can tell you right now that even if IsSelected is true, if it's the same as MouseOver when you roll out of your control it'll go back to the normal state, so it won't look selected anymore.
You could add a ControlStoryboard action and attach a DataTrigger. The trigger should allow you to specify multiple conditions. From the Assets tab, select the Behaviors category and drag a ControlStoryboard action to the appropriate art board element. Then in the Properties tab, select the New button next to the trigger action. You should be able to select a DataTrigger and then configure the conditions you want. Finally you need to indicate which storyboard you actually want to run.
精彩评论