Skip to content

Commit 5b51376

Browse files
committed
Stagger animations on settings page
1 parent 5483881 commit 5b51376

File tree

1 file changed

+42
-28
lines changed

1 file changed

+42
-28
lines changed

ZuneModdingHelper/Pages/SettingsPage.xaml

Lines changed: 42 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
xmlns:zmhc="clr-namespace:ZuneModdingHelper.Controls"
88
xmlns:zmhs="clr-namespace:ZuneModdingHelper.Services"
99
xmlns:ocW="clr-namespace:OwlCore.Wpf;assembly=OwlCore.Wpf"
10+
xmlns:b="clr-namespace:ZuneModdingHelper.Behaviors"
11+
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
1012
mc:Ignorable="d"
1113
d:DesignHeight="450" d:DesignWidth="800"
1214
d:Background="White"
@@ -21,36 +23,48 @@
2123

2224
<ScrollViewer VerticalScrollBarVisibility="Auto">
2325
<StackPanel>
24-
<TextBlock Style="{StaticResource ZuneBodyTextBlockStyle}">
25-
<Run Text="Zune" Style="{StaticResource ZuneHeaderTextStyle}"/>
26-
</TextBlock>
27-
<TextBlock Text="Choose the directory where the Zune software is installed." Margin="0,8"
28-
Style="{StaticResource ZuneBodyTextBlockStyle}" />
29-
<TextBox Text="{Binding Settings.ZuneInstallDir}"/>
30-
<Button Content="LOCATE" HorizontalAlignment="Left" Margin="0,8,0,0"
31-
Visibility="{Binding FolderPickerVisibility, Mode=OneTime}"
32-
Click="LocateZuneButton_Click"/>
26+
<StackPanel>
27+
<TextBlock Style="{StaticResource ZuneBodyTextBlockStyle}">
28+
<Run Text="Zune" Style="{StaticResource ZuneHeaderTextStyle}"/>
29+
</TextBlock>
30+
<TextBlock Text="Choose the directory where the Zune software is installed." Margin="0,8"
31+
Style="{StaticResource ZuneBodyTextBlockStyle}" />
32+
<TextBox Text="{Binding Settings.ZuneInstallDir}"/>
33+
<Button Content="LOCATE" HorizontalAlignment="Left" Margin="0,8,0,0"
34+
Visibility="{Binding FolderPickerVisibility, Mode=OneTime}"
35+
Click="LocateZuneButton_Click"/>
3336

34-
<TextBlock Text="Force close all Zune processes that may prevent mods from being applied. May cause data loss." Margin="0,12,0,0"
35-
Style="{StaticResource ZuneBodyTextBlockStyle}" />
36-
<Button Content="KILL ALL" HorizontalAlignment="Left" Margin="0,8,0,0"
37-
Visibility="{Binding FolderPickerVisibility, Mode=OneTime}"
38-
Click="KillZuneButton_Click"/>
37+
<TextBlock Text="Force close all Zune processes that may prevent mods from being applied. May cause data loss." Margin="0,12,0,0"
38+
Style="{StaticResource ZuneBodyTextBlockStyle}" />
39+
<Button Content="KILL ALL" HorizontalAlignment="Left" Margin="0,8,0,0"
40+
Visibility="{Binding FolderPickerVisibility, Mode=OneTime}"
41+
Click="KillZuneButton_Click"/>
42+
</StackPanel>
3943

40-
<TextBlock Margin="0,24,0,0" Style="{StaticResource ZuneBodyTextBlockStyle}">
41-
<Run Text="General" Style="{StaticResource ZuneHeaderTextStyle}"/>
42-
</TextBlock>
43-
<TextBlock Text="Choose how often the donation prompt is shown." Margin="0,8"
44-
Style="{StaticResource ZuneBodyTextBlockStyle}" />
45-
<ComboBox SelectedValue="{Binding Settings.DonationRequestInterval}"
46-
ItemsSource="{ocW:EnumValues Enum=zmhs:DonationRequestInterval}"
47-
HorizontalAlignment="Left">
48-
<ComboBox.ItemTemplate>
49-
<DataTemplate DataType="{x:Type zmhs:DonationRequestInterval}">
50-
<TextBlock Text="{Binding Converter={StaticResource DonReqIntv}}"/>
51-
</DataTemplate>
52-
</ComboBox.ItemTemplate>
53-
</ComboBox>
44+
<StackPanel>
45+
<TextBlock Margin="0,24,0,0" Style="{StaticResource ZuneBodyTextBlockStyle}">
46+
<Run Text="General" Style="{StaticResource ZuneHeaderTextStyle}"/>
47+
</TextBlock>
48+
<TextBlock Text="Choose how often the donation prompt is shown." Margin="0,8"
49+
Style="{StaticResource ZuneBodyTextBlockStyle}" />
50+
<ComboBox SelectedValue="{Binding Settings.DonationRequestInterval}"
51+
ItemsSource="{ocW:EnumValues Enum=zmhs:DonationRequestInterval}"
52+
HorizontalAlignment="Left">
53+
<ComboBox.ItemTemplate>
54+
<DataTemplate DataType="{x:Type zmhs:DonationRequestInterval}">
55+
<TextBlock Text="{Binding Converter={StaticResource DonReqIntv}}"/>
56+
</DataTemplate>
57+
</ComboBox.ItemTemplate>
58+
</ComboBox>
59+
</StackPanel>
60+
61+
<i:Interaction.Behaviors>
62+
<b:FadeAnimateItemsPanelBehavior Tick="0:0:0.05">
63+
<b:FadeAnimateItemsPanelBehavior.Animation>
64+
<DoubleAnimation From="0" To="1" Duration="0:0:0.3"/>
65+
</b:FadeAnimateItemsPanelBehavior.Animation>
66+
</b:FadeAnimateItemsPanelBehavior>
67+
</i:Interaction.Behaviors>
5468
</StackPanel>
5569
</ScrollViewer>
5670
</UserControl>

0 commit comments

Comments
 (0)