From 96c6e87f7276efbea2faf53668bd7aea8f9ec15d Mon Sep 17 00:00:00 2001 From: JH Choi Date: Wed, 18 Oct 2017 16:52:51 +0900 Subject: [PATCH] Fade animation bug fixed.(TNET-1222) Change-Id: I4c3a1f0a5bf3eb935554ceec759fe274df581c50 Signed-off-by: JH Choi --- TVHome/TVHome/Views/SubPanel.xaml.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/TVHome/TVHome/Views/SubPanel.xaml.cs b/TVHome/TVHome/Views/SubPanel.xaml.cs index 6bb8bab..fcd12d2 100755 --- a/TVHome/TVHome/Views/SubPanel.xaml.cs +++ b/TVHome/TVHome/Views/SubPanel.xaml.cs @@ -376,11 +376,15 @@ namespace TVHome.Views AnimationExtensions.AbortAnimation(this, "PanelAnimation"); var currentTranslationY = TranslationY; var diff = -selectTransitionHeight - currentTranslationY; + var currentOpacity = Opacity; + var opacityDiff = 1 - currentOpacity; DebuggingUtils.Dbg("" + currentTranslationY); DebuggingUtils.Dbg("" + (currentTranslationY + diff)); Animation animation = new Animation(); Animation translateAnimation = new Animation(v => TranslationY = (currentTranslationY + diff * v)); + Animation fadeAnimation = new Animation(v => Opacity = currentOpacity + opacityDiff * v); animation.Add(0.5, 1, translateAnimation); + animation.Add(0.5, 1, fadeAnimation); animation.Commit(this, "PanelAnimation", length: 600); } -- 2.34.1