I am creating a ComboBox in my UWP application and I am trying to find a solution for missing drop-down animations in a control.
It seems that the open / close animation has been removed with the Anniversary Update, I mean that they are still playing in the Settings app for some reason, but I no longer see them in my app or in A calculator or any other UWP application compiled for Windows 10 14393.
This is what I see in the ComboBox template:
<VisualStateGroup x:Name="DropDownStates"> <VisualState x:Name="Opened"> <Storyboard> <SplitOpenThemeAnimation OpenedTargetName="PopupBorder" ClosedTargetName="ContentPresenter" OffsetFromCenter="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.DropDownOffset}" OpenedLength="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.DropDownOpenedHeight}"/> </Storyboard> </VisualState> <VisualState x:Name="Closed"> <Storyboard> <SplitCloseThemeAnimation OpenedTargetName="PopupBorder" ClosedTargetName="ContentPresenter" OffsetFromCenter="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.DropDownOffset}" OpenedLength="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.DropDownOpenedHeight}"/> </Storyboard> </VisualState> </VisualStateGroup>
Those SplitOpenThemeAnimation animations are not really animations, since they behave like a setter, their effect is immediate and not animated at all.
I was wondering if there is an easy way to restore previous animations (maybe I just donβt have a simple option / parameter to add to XAML?) Without having to manually interact with the template and record my own clip / transform animations, which I would prefer not to do here , since MS will change the template again in a future build, I would do everything in vain.
Any suggestions here? Thanks!
EDIT: Right now, the workaround I am using, but I would like to have something that supports slide / crop animation, as the original animation did.
<VisualState x:Name="Opened"> <Storyboard> <DoubleAnimation Storyboard.TargetName="Popup" Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:0.2"> <DoubleAnimation.EasingFunction> <CircleEase EasingMode="EaseOut"/> </DoubleAnimation.EasingFunction> </DoubleAnimation> <DoubleAnimation Storyboard.TargetName="PopupTransform" Storyboard.TargetProperty="(TranslateTransform.Y)" From="-20" To="0" Duration="0:0:0.2"> <DoubleAnimation.EasingFunction> <CircleEase EasingMode="EaseOut"/> </DoubleAnimation.EasingFunction> </DoubleAnimation> </Storyboard>