Skip to content

Commit 6a63a60

Browse files
committed
fine tuning of the Snackbar animation
1 parent effbe02 commit 6a63a60

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

MainDemo.Wpf/Snackbar.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ private void ShowMultilineSnackbarButtonClickHandler(object sender, RoutedEventA
6565

6666
snackbar.ActionLabel = "GOT IT";
6767
snackbar.VisibilityTimeout = 6000;
68-
snackbar.Content = new string("The specs says that the maximum with should be 568dp. However there sould be at most only two lines of text.".ToCharArray());
68+
snackbar.Content = new string("The specs says that the maximum width should be 568dp. However there sould be at most only two lines of text.".ToCharArray());
6969
}
7070

7171
private async void SnackbarActionClickHandler(object sender, RoutedEventArgs args)

MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.Snackbar.xaml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,16 +71,28 @@
7171
<Trigger.EnterActions>
7272
<BeginStoryboard>
7373
<Storyboard>
74-
<DoubleAnimation Storyboard.TargetName="PART_contentPanel" Storyboard.TargetProperty="Tag" From="0" To="1" Duration="0:0:0.3" />
74+
<DoubleAnimation Storyboard.TargetName="PART_contentPanel" Storyboard.TargetProperty="Tag" From="0" To="1" Duration="0:0:0.3">
75+
<DoubleAnimation.EasingFunction>
76+
<QuarticEase EasingMode="EaseOut" />
77+
</DoubleAnimation.EasingFunction>
78+
</DoubleAnimation>
7579
<DoubleAnimation Storyboard.TargetName="PART_contentGrid" Storyboard.TargetProperty="Opacity" To="0" BeginTime="0" Duration="0" />
76-
<DoubleAnimation Storyboard.TargetName="PART_contentGrid" Storyboard.TargetProperty="Opacity" From="0" To="1" BeginTime="0:0:0.15" Duration="0:0:0.15" />
80+
<DoubleAnimation Storyboard.TargetName="PART_contentGrid" Storyboard.TargetProperty="Opacity" From="0" To="1" BeginTime="0" Duration="0:0:0.3">
81+
<DoubleAnimation.EasingFunction>
82+
<QuarticEase EasingMode="EaseOut" />
83+
</DoubleAnimation.EasingFunction>
84+
</DoubleAnimation>
7785
</Storyboard>
7886
</BeginStoryboard>
7987
</Trigger.EnterActions>
8088
<Trigger.ExitActions>
8189
<BeginStoryboard>
8290
<Storyboard>
83-
<DoubleAnimation Storyboard.TargetName="PART_contentPanel" Storyboard.TargetProperty="Tag" From="1" To="0" Duration="0:0:0.3"/>
91+
<DoubleAnimation Storyboard.TargetName="PART_contentPanel" Storyboard.TargetProperty="Tag" From="1" To="0" Duration="0:0:0.3">
92+
<DoubleAnimation.EasingFunction>
93+
<QuarticEase EasingMode="EaseOut" />
94+
</DoubleAnimation.EasingFunction>
95+
</DoubleAnimation>
8496
</Storyboard>
8597
</BeginStoryboard>
8698
</Trigger.ExitActions>

0 commit comments

Comments
 (0)