Adding animations (#23208)

This commit is contained in:
Niels Laute 2023-01-11 17:45:06 +01:00 committed by GitHub
parent eb2968de6e
commit dae0520375
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
21 changed files with 29 additions and 31 deletions

View File

@ -57,6 +57,11 @@
BasedOn="{StaticResource DefaultCheckBoxStyle}"
TargetType="controls:CheckBoxWithDescriptionControl" />
<!-- Other app resources here -->
<TransitionCollection x:Key="SettingsCardsAnimations">
<EntranceThemeTransition FromVerticalOffset="50"/> <!-- Animates cards when loaded-->
<RepositionThemeTransition IsStaggeringEnabled="False" /><!-- Smoothly animates individual cards upon whenever Expanders are expanded/collapsed -->
</TransitionCollection>
</ResourceDictionary>
</Application.Resources>
</Application>

View File

@ -8,6 +8,7 @@
<Setter.Value>
<ItemsPanelTemplate>
<StackPanel
ChildrenTransitions="{StaticResource SettingsCardsAnimations}"
Orientation="Vertical"
Spacing="2" />
</ItemsPanelTemplate>
@ -41,25 +42,19 @@
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
TextWrapping="WrapWholeWords">
<ContentPresenter.Resources>
<Style
BasedOn="{StaticResource CaptionTextBlockStyle}"
TargetType="TextBlock">
<Style BasedOn="{StaticResource CaptionTextBlockStyle}" TargetType="TextBlock">
<Style.Setters>
<Setter Property="TextWrapping" Value="WrapWholeWords" />
</Style.Setters>
</Style>
<Style
BasedOn="{StaticResource TextButtonStyle}"
TargetType="HyperlinkButton">
<Style BasedOn="{StaticResource TextButtonStyle}" TargetType="HyperlinkButton">
<Style.Setters>
<Setter Property="Padding" Value="0,0,0,0" />
</Style.Setters>
</Style>
</ContentPresenter.Resources>
</ContentPresenter>
<ItemsPresenter
Grid.Row="2"
Margin="0,8,0,0" />
<ItemsPresenter Grid.Row="2" Margin="0,8,0,0" />
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal" />

View File

@ -38,7 +38,7 @@
Text="{x:Bind ModuleTitle}" />
<ScrollViewer Grid.Row="1">
<Grid
<Grid ChildrenTransitions="{StaticResource SettingsCardsAnimations}"
Padding="0,0,20,48"
RowSpacing="24">

View File

@ -15,7 +15,7 @@
IsTabStop="False"
ModuleImageSource="ms-appx:///Assets/Modules/AlwaysOnTop.png">
<controls:SettingsPageControl.ModuleContent>
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Vertical" ChildrenTransitions="{StaticResource SettingsCardsAnimations}">
<labs:SettingsCard
x:Uid="AlwaysOnTop_EnableToggleControl_HeaderText"
HeaderIcon="{ui:BitmapIcon Source=/Assets/FluentIcons/FluentIconsAlwaysOnTop.png}"

View File

@ -20,7 +20,7 @@
IsTabStop="False"
ModuleImageSource="ms-appx:///Assets/Modules/Awake.png">
<controls:SettingsPageControl.ModuleContent>
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Vertical" ChildrenTransitions="{StaticResource SettingsCardsAnimations}">
<labs:SettingsCard
x:Uid="Awake_EnableAwake"
HeaderIcon="{ui:BitmapIcon Source=/Assets/FluentIcons/FluentIconsAwake.png}"

View File

@ -22,7 +22,7 @@
<controls:SettingsPageControl x:Uid="ColorPicker" ModuleImageSource="ms-appx:///Assets/Modules/ColorPicker.png">
<controls:SettingsPageControl.ModuleContent>
<StackPanel x:Name="ColorPickerView" Orientation="Vertical">
<StackPanel x:Name="ColorPickerView" Orientation="Vertical" ChildrenTransitions="{StaticResource SettingsCardsAnimations}">
<labs:SettingsCard
x:Uid="ColorPicker_EnableColorPicker"
HeaderIcon="{ui:BitmapIcon Source=/Assets/FluentIcons/FluentIconsColorPicker.png}"

View File

@ -14,7 +14,7 @@
x:Uid="FancyZones"
ModuleImageSource="ms-appx:///Assets/Modules/FancyZones.png">
<controls:SettingsPageControl.ModuleContent>
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Vertical" ChildrenTransitions="{StaticResource SettingsCardsAnimations}">
<labs:SettingsCard
x:Uid="FancyZones_EnableToggleControl_HeaderText"
HeaderIcon="{ui:BitmapIcon Source=/Assets/FluentIcons/FluentIconsFancyZones.png}"

View File

@ -15,7 +15,7 @@
x:Uid="FileLocksmith"
ModuleImageSource="ms-appx:///Assets/Modules/FileLocksmith.png">
<controls:SettingsPageControl.ModuleContent>
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Vertical" ChildrenTransitions="{StaticResource SettingsCardsAnimations}">
<labs:SettingsCard
x:Uid="FileLocksmith_Enable_FileLocksmith"
HeaderIcon="{ui:BitmapIcon Source=/Assets/FluentIcons/FluentIconsFileLocksmith.png}"

View File

@ -20,7 +20,7 @@
x:Uid="General"
ModuleImageSource="ms-appx:///Assets/Modules/PT.png">
<controls:SettingsPageControl.ModuleContent>
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Vertical" ChildrenTransitions="{StaticResource SettingsCardsAnimations}">
<controls:SettingsGroup
x:Uid="General_Version"
Margin="0,-32,0,0">

View File

@ -13,7 +13,7 @@
x:Uid="Hosts"
ModuleImageSource="ms-appx:///Assets/Modules/AlwaysOnTop.png">
<controls:SettingsPageControl.ModuleContent>
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Vertical" ChildrenTransitions="{StaticResource SettingsCardsAnimations}">
<labs:SettingsCard
x:Uid="Hosts_EnableToggleControl_HeaderText"
HeaderIcon="{ui:BitmapIcon Source=/Assets/FluentIcons/FluentIconsHosts.png}"

View File

@ -25,7 +25,7 @@
x:Uid="ImageResizer"
ModuleImageSource="ms-appx:///Assets/Modules/ImageResizer.png">
<controls:SettingsPageControl.ModuleContent>
<StackPanel>
<StackPanel ChildrenTransitions="{StaticResource SettingsCardsAnimations}">
<labs:SettingsCard
x:Uid="ImageResizer_EnableToggle"
HeaderIcon="{ui:BitmapIcon Source=/Assets/FluentIcons/FluentIconsImageResizer.png}"

View File

@ -60,7 +60,7 @@
x:Uid="KeyboardManager"
ModuleImageSource="ms-appx:///Assets/Modules/KBM.png">
<controls:SettingsPageControl.ModuleContent>
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Vertical" ChildrenTransitions="{StaticResource SettingsCardsAnimations}">
<labs:SettingsCard
x:Uid="KeyboardManager_EnableToggle"
HeaderIcon="{ui:BitmapIcon Source=/Assets/FluentIcons/FluentIconsKeyboardManager.png}"

View File

@ -14,7 +14,7 @@
x:Uid="MeasureTool"
ModuleImageSource="ms-appx:///Assets/Modules/ScreenRuler.png">
<controls:SettingsPageControl.ModuleContent>
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Vertical" ChildrenTransitions="{StaticResource SettingsCardsAnimations}">
<labs:SettingsCard
x:Uid="MeasureTool_EnableMeasureTool"
HeaderIcon="{ui:BitmapIcon Source=/Assets/FluentIcons/FluentIconsScreenRuler.png}"

View File

@ -17,7 +17,7 @@
x:Uid="MouseUtils"
ModuleImageSource="ms-appx:///Assets/Modules/MouseUtils.png">
<controls:SettingsPageControl.ModuleContent>
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Vertical" ChildrenTransitions="{StaticResource SettingsCardsAnimations}">
<controls:SettingsGroup x:Uid="MouseUtils_FindMyMouse">
<labs:SettingsCard
x:Uid="MouseUtils_Enable_FindMyMouse"

View File

@ -15,7 +15,7 @@
IsTabStop="False"
ModuleImageSource="ms-appx:///Assets/Modules/PowerAccent.png">
<controls:SettingsPageControl.ModuleContent>
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Vertical" ChildrenTransitions="{StaticResource SettingsCardsAnimations}">
<labs:SettingsCard
x:Uid="QuickAccent_EnableQuickAccent"
HeaderIcon="{ui:BitmapIcon Source=/Assets/FluentIcons/FluentIconsPowerAccent.png}"

View File

@ -18,7 +18,7 @@
ModuleImageSource="ms-appx:///Assets/Modules/PowerLauncher.png">
<controls:SettingsPageControl.ModuleContent>
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Vertical" ChildrenTransitions="{StaticResource SettingsCardsAnimations}">
<labs:SettingsCard
x:Uid="PowerLauncher_EnablePowerLauncher"
HeaderIcon="{ui:BitmapIcon Source=/Assets/FluentIcons/FluentIconsPowerToysRun.png}"

View File

@ -14,9 +14,8 @@
x:Uid="TextExtractor"
ModuleImageSource="ms-appx:///Assets/Modules/PowerOCR.png">
<controls:SettingsPageControl.ModuleContent>
<StackPanel
Orientation="Vertical"
Spacing="2">
<StackPanel ChildrenTransitions="{StaticResource SettingsCardsAnimations}"
Orientation="Vertical" Spacing="2">
<labs:SettingsCard
x:Uid="TextExtractor_EnableToggleControl_HeaderText"
HeaderIcon="{ui:BitmapIcon Source=/Assets/FluentIcons/FluentIconsPowerOcr.png}"

View File

@ -14,7 +14,7 @@
x:Uid="FileExplorerPreview"
ModuleImageSource="ms-appx:///Assets/Modules/PowerPreview.png">
<controls:SettingsPageControl.ModuleContent>
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Vertical" ChildrenTransitions="{StaticResource SettingsCardsAnimations}">
<controls:SettingsGroup x:Uid="FileExplorerPreview_PreviewPane">
<InfoBar
x:Uid="FileExplorerPreview_PreviewHandlerOutlookIncompatibility"

View File

@ -15,8 +15,7 @@
ModuleImageSource="ms-appx:///Assets/Modules/PowerRename.png">
<controls:SettingsPageControl.ModuleContent>
<StackPanel
x:Name="PowerRenameView"
HorizontalAlignment="Stretch"
x:Name="PowerRenameView" ChildrenTransitions="{StaticResource SettingsCardsAnimations}"
Orientation="Vertical">
<labs:SettingsCard
x:Uid="PowerRename_Toggle_Enable"

View File

@ -14,7 +14,7 @@
x:Uid="ShortcutGuide"
ModuleImageSource="ms-appx:///Assets/Modules/ShortcutGuide.png">
<controls:SettingsPageControl.ModuleContent>
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Vertical" ChildrenTransitions="{StaticResource SettingsCardsAnimations}">
<labs:SettingsCard
x:Uid="ShortcutGuide_Enable"
HeaderIcon="{ui:BitmapIcon Source=/Assets/FluentIcons/FluentIconsShortcutGuide.png}"

View File

@ -22,7 +22,7 @@
ModuleImageSource="ms-appx:///Assets/Modules/VideoConference.png">
<controls:SettingsPageControl.ModuleContent>
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Vertical" ChildrenTransitions="{StaticResource SettingsCardsAnimations}">
<InfoBar
x:Uid="VideoConference_DeprecationWarning"
IsClosable="False"