CommunityToolkit/WindowsCommunityToolkit

Animating height of element in a DockPanel jumps from start to finish immediately

Open

#3,464 建立於 2020年9月3日

在 GitHub 查看
 (10 留言) (0 反應) (0 負責人)C# (1,403 fork)batch import
animations :izakaya_lantern:bug :bug:controls :control_knobs:help wantedneed more info :pushpin:

倉庫指標

Star
 (5,708 star)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

Describe the bug

When animating the height of a Border with Dock="Top" element inside a DockPanel. The animation is not executed, and the height jumps from start to finish immediatly. This seems to be Height specific, as Opacity works for me without issue. No errors, exceptions or other are shown.

Element defined like this:

<controls:DockPanel>
      <Border Height="90" controls:DockPanel.Dock="Top" x:Name="theBorder" BorderBrush="#444444" BorderThickness="0 0 0 1">
      <!-- more things here -->
</controls:DockPanel>
<!-- xmlns:controls="using:Microsoft.Toolkit.Uwp.UI.Controls" -->

Animated like this inside a VisualState:

<Storyboard>
        <DoubleAnimation Storyboard.TargetName="theBorder" Storyboard.TargetProperty="Height" To="0" />
</Storyboard>
  • Is this bug a regression in the toolkit? If so, what toolkit version did you last see it work:

Steps to Reproduce

See above

Expected behavior

Smooth animation from 80px height to 0px height.

Environment

NuGet Package(s): 

Package Version(s): 

Windows 10 Build Number:
- [ ] Fall Creators Update (16299)
- [ ] April 2018 Update (17134)
- [ ] October 2018 Update (17763)
- [ ] May 2019 Update (18362)
- [x] May 2020 Update (19041)
- [ ] Insider Build (build number: )

App min and target version:
- [ ] Fall Creators Update (16299)
- [ ] April 2018 Update (17134)
- [min] October 2018 Update (17763)
- [ ] May 2019 Update (18362)
- [target] May 2020 Update (19041)
- [ ] Insider Build (xxxxx)

Device form factor:
- [x] Desktop
- [ ] Xbox
- [ ] Surface Hub
- [ ] IoT

Visual Studio 
- [ ] 2017 (version: )
- [x] 2019 (version: 16.7) 
- [x] 2019 Preview (version: 16.8 Preview 2)

Additional context

This is the UWP version. "Microsoft.Toolkit.Uwp.UI.Controls" nuget package, version 6.1.1

貢獻者指南