Skip to content

Commit 5d7288c

Browse files
committed
animate Opacity of the Snackbar content
1 parent b5188d7 commit 5d7288c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.Snackbar.xaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@
8484
<TextBlock Text="{Binding}">
8585
<TextBlock.Style>
8686
<Style TargetType="{x:Type TextBlock}" BasedOn="{StaticResource MaterialDesignBody1TextBlock}">
87+
<Setter Property="FontSize" Value="14" />
8788
<Setter Property="TextWrapping" Value="WrapWithOverflow" />
8889
<Setter Property="TextTrimming" Value="CharacterEllipsis" />
8990
</Style>
@@ -133,6 +134,12 @@
133134
<SineEase EasingMode="EaseOut" />
134135
</DoubleAnimation.EasingFunction>
135136
</DoubleAnimation>
137+
<DoubleAnimation Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Opacity" To="0" BeginTime="0" Duration="0" />
138+
<DoubleAnimation Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Opacity" From="0" To="1" BeginTime="0:0:0.075" Duration="0:0:0.225">
139+
<DoubleAnimation.EasingFunction>
140+
<SineEase EasingMode="EaseOut" />
141+
</DoubleAnimation.EasingFunction>
142+
</DoubleAnimation>
136143
</Storyboard>
137144
<Storyboard x:Key="DeactivateStoryboard" Duration="0:0:0.3">
138145
<DoubleAnimation Storyboard.TargetName="Root" Storyboard.TargetProperty="Tag" From="1" To="0" Duration="0:0:0.3">

0 commit comments

Comments
 (0)