Xaml 已关闭Windows 10中组合框的VisualState,未播放动画
我对Xaml 已关闭Windows 10中组合框的VisualState,未播放动画,xaml,combobox,windows-10,visualstatemanager,uwp,Xaml,Combobox,Windows 10,Visualstatemanager,Uwp,我对组合框的关闭的VisualState有问题。处于关闭状态的动画仅第一次播放 首次打开组合框[所有动画正常] 组合框第二次打开[否关闭动画] 下面是我正在使用的XAML: <VisualStateGroup x:Name="DropDownStates"> <VisualState x:Name="Opened"> <Storyboard> <SplitOpenThemeAnimation Close
组合框的关闭的VisualState有问题。处于关闭状态的动画仅第一次播放
- 首次打开组合框[所有动画正常]
- 组合框第二次打开[否<代码>关闭代码>动画]
下面是我正在使用的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>
你能给我一些建议吗,我做错了什么?谢谢 我用于此的解决方法是从我的样式中删除“Closed”的VisualState
。完成此操作后,组合框按预期工作。我用于此操作的解决方法是从我的样式中删除“Closed”的VisualState
。完成此操作后,组合框
按预期工作。似乎默认样式也有相同的问题。您是否从组合框的默认样式中提取了此内容?是的,代码段是从默认样式中提取的。这是一个错误吗?似乎默认样式也有同样的问题。您是从组合框的默认样式中提取的吗?是的,代码段是从默认样式中提取的。是虫子吗?