Skip to content

Commit c5c71df

Browse files
authored
Added subtle listview animation (#7311)
1 parent 531fcc6 commit c5c71df

File tree

4 files changed

+46
-7
lines changed

4 files changed

+46
-7
lines changed

src/Files/Views/LayoutModes/ColumnViewBase.xaml

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,15 @@
33
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
44
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
55
xmlns:ViewModels="using:Files.ViewModels"
6+
xmlns:animations="using:Microsoft.Toolkit.Uwp.UI.Animations"
7+
xmlns:behaviors="using:Microsoft.Toolkit.Uwp.UI.Behaviors"
68
xmlns:controls="using:Microsoft.Toolkit.Uwp.UI.Controls"
79
xmlns:converters="using:Microsoft.Toolkit.Uwp.UI.Converters"
810
xmlns:converters1="using:Files.Converters"
911
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
1012
xmlns:helpers="using:Files.Helpers"
13+
xmlns:i="using:Microsoft.Xaml.Interactivity"
14+
xmlns:icore="using:Microsoft.Xaml.Interactions.Core"
1115
xmlns:local="using:Files"
1216
xmlns:local2="using:Files.Filesystem"
1317
xmlns:local3="using:Files.Filesystem.Cloud"
@@ -171,9 +175,7 @@
171175

172176
<ListView.ItemContainerTransitions>
173177
<TransitionCollection>
174-
<!--<ContentThemeTransition />-->
175-
<ReorderThemeTransition />
176-
<EntranceThemeTransition IsStaggeringEnabled="False" />
178+
<AddDeleteThemeTransition />
177179
</TransitionCollection>
178180
</ListView.ItemContainerTransitions>
179181

@@ -196,6 +198,26 @@
196198
<ColumnDefinition Width="*" />
197199
<ColumnDefinition Width="Auto" />
198200
</Grid.ColumnDefinitions>
201+
<animations:Explicit.Animations>
202+
<animations:AnimationSet x:Name="FadeAnimation">
203+
<animations:OpacityAnimation
204+
Delay="0"
205+
EasingMode="EaseIn"
206+
EasingType="Linear"
207+
From="0"
208+
To="1"
209+
Duration="0:0:.05" />
210+
<animations:TranslationAnimation
211+
From="0, 5, 0"
212+
To="0"
213+
Duration="0:0:.1" />
214+
</animations:AnimationSet>
215+
</animations:Explicit.Animations>
216+
<i:Interaction.Behaviors>
217+
<icore:EventTriggerBehavior EventName="Loaded">
218+
<behaviors:StartAnimationAction Animation="{Binding ElementName=FadeAnimation}" />
219+
</icore:EventTriggerBehavior>
220+
</i:Interaction.Behaviors>
199221
<Grid
200222
Grid.Column="0"
201223
Width="24"

src/Files/Views/LayoutModes/DetailsLayoutBrowser.xaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -518,6 +518,26 @@
518518
<ColumnDefinition Width="{Binding ColumnsViewModel.SizeColumn.LengthIncludingGridSplitter, ElementName=PageRoot, Mode=OneWay}" />
519519
<ColumnDefinition Width="{Binding ColumnsViewModel.StatusColumn.LengthIncludingGridSplitter, ElementName=PageRoot, Mode=OneWay}" />
520520
</Grid.ColumnDefinitions>
521+
<animations:Explicit.Animations>
522+
<animations:AnimationSet x:Name="FadeAnimation">
523+
<animations:OpacityAnimation
524+
Delay="0"
525+
EasingMode="EaseIn"
526+
EasingType="Linear"
527+
From="0"
528+
To="1"
529+
Duration="0:0:0.05" />
530+
<animations:TranslationAnimation
531+
From="0, 5, 0"
532+
To="0"
533+
Duration="0:0:.1" />
534+
</animations:AnimationSet>
535+
</animations:Explicit.Animations>
536+
<i:Interaction.Behaviors>
537+
<icore:EventTriggerBehavior EventName="Loaded">
538+
<behaviors:StartAnimationAction Animation="{Binding ElementName=FadeAnimation}" />
539+
</icore:EventTriggerBehavior>
540+
</i:Interaction.Behaviors>
521541
<Grid
522542
x:Uid="FileBrowserThumbnailIconColumnGrid"
523543
Grid.Column="0"

src/Files/Views/LayoutModes/GridViewBrowser.xaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -574,9 +574,6 @@
574574
<controls:AdaptiveGridView.ItemContainerTransitions>
575575
<TransitionCollection>
576576
<AddDeleteThemeTransition />
577-
<!--<ContentThemeTransition />-->
578-
<ReorderThemeTransition />
579-
<EntranceThemeTransition IsStaggeringEnabled="False" />
580577
</TransitionCollection>
581578
</controls:AdaptiveGridView.ItemContainerTransitions>
582579

src/Files/Views/ModernShellPage.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1088,7 +1088,7 @@ public void NavigateToPath(string navigationPath, Type sourcePageType, Navigatio
10881088
|| ItemDisplayFrame.Content.GetType() == typeof(WidgetsPage) &&
10891089
(sourcePageType == typeof(DetailsLayoutBrowser) || sourcePageType == typeof(GridViewBrowser)))
10901090
{
1091-
transition = new EntranceNavigationTransitionInfo();
1091+
transition = new SuppressNavigationTransitionInfo();
10921092
}
10931093

10941094
ItemDisplayFrame.Navigate(

0 commit comments

Comments
 (0)