Closed
我的VisualState有问题ComboBox
。状态动画Closed
仅第一次播放。
- 第一次打开ComboBox 【所有动画OK】
- ComboBox第二次打开【无
Closed
动画】
这是我正在使用的 XAML:
<VisualStateGroup x:Name="DropDownStates">
<VisualState x:Name="Opened">
<Storyboard>
<SplitOpenThemeAnimation ClosedTargetName="ContentPresenter"
OpenedTargetName="PopupBorder"
ClosedLength="0"
OpenedLength="{Binding TemplateSettings.DropDownOpenedHeight, RelativeSource={RelativeSource Mode=TemplatedParent}}" />
<ColorAnimation To="Transparent"
Duration="0:0:0.1"
Storyboard.TargetProperty="(UIElement.BorderBrush).(SolidColorBrush.Color)"
Storyboard.TargetName="Background"/>
<DoubleAnimation Storyboard.TargetName="DropDownGlyph"
Storyboard.TargetProperty="Opacity"
To="0"
Duration="0:0:0.2">
<DoubleAnimation.EasingFunction>
<PowerEase EasingMode="EaseIn" />
</DoubleAnimation.EasingFunction>
</DoubleAnimation>
</Storyboard>
</VisualState>
<VisualState x:Name="Closed">
<Storyboard>
<SplitCloseThemeAnimation ClosedTargetName="ContentPresenter"
OpenedTargetName="PopupBorder"
ClosedLength="0"
OpenedLength="{Binding TemplateSettings.DropDownOpenedHeight, RelativeSource={RelativeSource Mode=TemplatedParent}}" />
<ColorAnimation To="#66D3D3D3"
Duration="0:0:0.1"
Storyboard.TargetProperty="(UIElement.BorderBrush).(SolidColorBrush.Color)"
Storyboard.TargetName="Background" />
<DoubleAnimation Storyboard.TargetName="DropDownGlyph"
Storyboard.TargetProperty="Opacity"
To="1"
Duration="0:0:0.2">
<DoubleAnimation.EasingFunction>
<PowerEase EasingMode="EaseIn" />
</DoubleAnimation.EasingFunction>
</DoubleAnimation>
</Storyboard>
</VisualState>
</VisualStateGroup>
你能给我一些建议吗,我做错了什么?谢谢!