我定义了以下MultiTrigger
:
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsExpanded" Value="true" />
<Condition Property="IsSelected" Value="true" />
</MultiTrigger.Conditions>
<Setter TargetName="ItemsHost" Property="Visibility" Value="Visible" />
<MultiTrigger.EnterActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation
FillBehavior="HoldEnd"
Storyboard.TargetName="ItemsHost"
Storyboard.TargetProperty="(ItemsPresenter.LayoutTransform).(ScaleTransform.ScaleY)"
From="0"
To="1"
Duration="0:0:0.2" />
</Storyboard>
</BeginStoryboard>
</MultiTrigger.EnterActions>
</MultiTrigger>
我认为只要IsExpanded
和IsSelected
都true
,它就会触发。现在,只要IsExpanded
已经true
,IsSelected
将更改为True
,就会触发。每当属性的更改时,我都需要触发它。我怎么能这样做?