Skip to content

Commit

Permalink
Fix element being hidden if another animation has started
Browse files Browse the repository at this point in the history
  • Loading branch information
angelsix committed Nov 11, 2017
1 parent 47dfdc0 commit 4dc109e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Source/Fasetto.Word/Animation/FrameworkElementAnimations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ public static async Task SlideAndFadeOutAsync(this FrameworkElement element, Ani
await Task.Delay((int)(seconds * 1000));

// Make element invisible
element.Visibility = Visibility.Hidden;
if (element.Opacity == 0)
element.Visibility = Visibility.Hidden;
}

#endregion
Expand Down
2 changes: 0 additions & 2 deletions Source/Fasetto.Word/Animation/StoryboardHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,6 @@ public static void AddFadeIn(this Storyboard storyboard, float seconds)
var animation = new DoubleAnimation
{
Duration = new Duration(TimeSpan.FromSeconds(seconds)),
From = 0,
To = 1,
};

Expand All @@ -268,7 +267,6 @@ public static void AddFadeOut(this Storyboard storyboard, float seconds)
var animation = new DoubleAnimation
{
Duration = new Duration(TimeSpan.FromSeconds(seconds)),
From = 1,
To = 0,
};

Expand Down

0 comments on commit 4dc109e

Please sign in to comment.