Skip to content

Commit 1d61dd6

Browse files
committed
Code Quality: Removed animations from Settings Dialog
1 parent f0ac088 commit 1d61dd6

File tree

10 files changed

+15
-55
lines changed

10 files changed

+15
-55
lines changed

src/Files.App/Dialogs/SettingsDialog.xaml.cs

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
using System;
99
using System.Threading.Tasks;
1010
using Files.App.Data.Enums;
11+
using Microsoft.UI.Xaml.Media.Animation;
1112

1213
namespace Files.App.Dialogs
1314
{
@@ -50,16 +51,16 @@ private void MainSettingsNavigationView_SelectionChanged(NavigationView sender,
5051

5152
_ = Enum.Parse<SettingsPageKind>(selectedItem.Tag.ToString()) switch
5253
{
53-
SettingsPageKind.GeneralPage => SettingsContentFrame.Navigate(typeof(GeneralPage)),
54-
SettingsPageKind.AppearancePage => SettingsContentFrame.Navigate(typeof(AppearancePage)),
55-
SettingsPageKind.LayoutPage => SettingsContentFrame.Navigate(typeof(LayoutPage)),
56-
SettingsPageKind.FoldersPage => SettingsContentFrame.Navigate(typeof(FoldersPage)),
57-
SettingsPageKind.ActionsPage => SettingsContentFrame.Navigate(typeof(ActionsPage)),
58-
SettingsPageKind.TagsPage => SettingsContentFrame.Navigate(typeof(TagsPage)),
59-
SettingsPageKind.DevToolsPage => SettingsContentFrame.Navigate(typeof(DevToolsPage)),
60-
SettingsPageKind.AdvancedPage => SettingsContentFrame.Navigate(typeof(AdvancedPage)),
61-
SettingsPageKind.AboutPage => SettingsContentFrame.Navigate(typeof(AboutPage)),
62-
_ => SettingsContentFrame.Navigate(typeof(AppearancePage))
54+
SettingsPageKind.GeneralPage => SettingsContentFrame.Navigate(typeof(GeneralPage), null, new SuppressNavigationTransitionInfo()),
55+
SettingsPageKind.AppearancePage => SettingsContentFrame.Navigate(typeof(AppearancePage), null, new SuppressNavigationTransitionInfo()),
56+
SettingsPageKind.LayoutPage => SettingsContentFrame.Navigate(typeof(LayoutPage), null, new SuppressNavigationTransitionInfo()),
57+
SettingsPageKind.FoldersPage => SettingsContentFrame.Navigate(typeof(FoldersPage), null, new SuppressNavigationTransitionInfo()),
58+
SettingsPageKind.ActionsPage => SettingsContentFrame.Navigate(typeof(ActionsPage), null, new SuppressNavigationTransitionInfo()),
59+
SettingsPageKind.TagsPage => SettingsContentFrame.Navigate(typeof(TagsPage), null, new SuppressNavigationTransitionInfo()),
60+
SettingsPageKind.DevToolsPage => SettingsContentFrame.Navigate(typeof(DevToolsPage), null, new SuppressNavigationTransitionInfo()),
61+
SettingsPageKind.AdvancedPage => SettingsContentFrame.Navigate(typeof(AdvancedPage), null, new SuppressNavigationTransitionInfo()),
62+
SettingsPageKind.AboutPage => SettingsContentFrame.Navigate(typeof(AboutPage), null, new SuppressNavigationTransitionInfo()),
63+
_ => SettingsContentFrame.Navigate(typeof(AppearancePage), null, new SuppressNavigationTransitionInfo())
6364
};
6465
}
6566

src/Files.App/Views/Settings/AboutPage.xaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,6 @@
2121
HorizontalAlignment="Stretch"
2222
VerticalAlignment="Stretch"
2323
Spacing="4">
24-
<StackPanel.ChildrenTransitions>
25-
<TransitionCollection>
26-
<EntranceThemeTransition />
27-
</TransitionCollection>
28-
</StackPanel.ChildrenTransitions>
2924

3025
<!-- Title -->
3126
<TextBlock

src/Files.App/Views/Settings/ActionsPage.xaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,6 @@
6262
HorizontalAlignment="Stretch"
6363
VerticalAlignment="Stretch"
6464
Spacing="4">
65-
<StackPanel.ChildrenTransitions>
66-
<TransitionCollection>
67-
<EntranceThemeTransition />
68-
</TransitionCollection>
69-
</StackPanel.ChildrenTransitions>
7065

7166
<!-- Title -->
7267
<TextBlock
@@ -384,6 +379,10 @@
384379
</Style>
385380
</ListView.ItemContainerStyle>
386381

382+
<!-- Remove All Transitions -->
383+
<ListView.ItemContainerTransitions>
384+
<TransitionCollection />
385+
</ListView.ItemContainerTransitions>
387386
</ListView>
388387

389388
</StackPanel>

src/Files.App/Views/Settings/AdvancedPage.xaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,6 @@
3232
HorizontalAlignment="Stretch"
3333
VerticalAlignment="Stretch"
3434
Spacing="4">
35-
<StackPanel.ChildrenTransitions>
36-
<TransitionCollection>
37-
<EntranceThemeTransition />
38-
</TransitionCollection>
39-
</StackPanel.ChildrenTransitions>
4035

4136
<!-- Title -->
4237
<TextBlock

src/Files.App/Views/Settings/AppearancePage.xaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,6 @@
9191
HorizontalAlignment="Stretch"
9292
VerticalAlignment="Stretch"
9393
Spacing="4">
94-
<StackPanel.ChildrenTransitions>
95-
<TransitionCollection>
96-
<EntranceThemeTransition />
97-
</TransitionCollection>
98-
</StackPanel.ChildrenTransitions>
9994

10095
<!-- Title -->
10196
<TextBlock

src/Files.App/Views/Settings/DevToolsPage.xaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,6 @@
3333
HorizontalAlignment="Stretch"
3434
VerticalAlignment="Stretch"
3535
Spacing="4">
36-
<StackPanel.ChildrenTransitions>
37-
<TransitionCollection>
38-
<EntranceThemeTransition />
39-
</TransitionCollection>
40-
</StackPanel.ChildrenTransitions>
4136

4237
<!-- Title -->
4338
<TextBlock

src/Files.App/Views/Settings/FoldersPage.xaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,6 @@
2424
HorizontalAlignment="Stretch"
2525
VerticalAlignment="Stretch"
2626
Spacing="4">
27-
<StackPanel.ChildrenTransitions>
28-
<TransitionCollection>
29-
<EntranceThemeTransition />
30-
</TransitionCollection>
31-
</StackPanel.ChildrenTransitions>
3227

3328
<!-- Title -->
3429
<TextBlock

src/Files.App/Views/Settings/GeneralPage.xaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,6 @@
2727
HorizontalAlignment="Stretch"
2828
VerticalAlignment="Stretch"
2929
Spacing="4">
30-
<StackPanel.ChildrenTransitions>
31-
<TransitionCollection>
32-
<EntranceThemeTransition />
33-
</TransitionCollection>
34-
</StackPanel.ChildrenTransitions>
3530

3631
<!-- Title -->
3732
<TextBlock

src/Files.App/Views/Settings/LayoutPage.xaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,6 @@
3131
HorizontalAlignment="Stretch"
3232
VerticalAlignment="Stretch"
3333
Spacing="4">
34-
<StackPanel.ChildrenTransitions>
35-
<TransitionCollection>
36-
<EntranceThemeTransition />
37-
</TransitionCollection>
38-
</StackPanel.ChildrenTransitions>
3934

4035
<!-- Title -->
4136
<TextBlock

src/Files.App/Views/Settings/TagsPage.xaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,6 @@
3838
HorizontalAlignment="Stretch"
3939
VerticalAlignment="Stretch"
4040
Spacing="4">
41-
<StackPanel.ChildrenTransitions>
42-
<TransitionCollection>
43-
<EntranceThemeTransition />
44-
</TransitionCollection>
45-
</StackPanel.ChildrenTransitions>
4641

4742
<!-- Title -->
4843
<TextBlock

0 commit comments

Comments
 (0)