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
21 changed files with 29 additions and 31 deletions

View File

@@ -57,6 +57,11 @@
BasedOn="{StaticResource DefaultCheckBoxStyle}" BasedOn="{StaticResource DefaultCheckBoxStyle}"
TargetType="controls:CheckBoxWithDescriptionControl" /> TargetType="controls:CheckBoxWithDescriptionControl" />
<!-- Other app resources here --> <!-- 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> </ResourceDictionary>
</Application.Resources> </Application.Resources>
</Application> </Application>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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