Skip to content

Commit 0ea3abf

Browse files
author
Llifon Osian Jones
committed
Fixes #820 - opacity of the old transition slide is now always set to 0
Previously, the old slide's opacity was only being set to 0 under very specific circumstances, rather than every time.
1 parent 2f35f2d commit 0ea3abf

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

MaterialDesignThemes.Wpf/Transitions/Transitioner.cs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,17 +197,23 @@ private void ActivateFrame(int selectedIndex, int unselectedIndex)
197197
}
198198

199199
if (newSlide != null)
200-
newSlide.Opacity = 1;
200+
{
201+
newSlide.Opacity = 1;
202+
}
203+
201204
if (oldSlide != null && newSlide != null)
202205
{
203206
var wipe = selectedIndex > unselectedIndex ? oldSlide.ForwardWipe : oldSlide.BackwardWipe;
204-
if (wipe != null)
205-
wipe.Wipe(oldSlide, newSlide, GetTransitionOrigin(newSlide), this);
207+
if (wipe != null)
208+
{
209+
wipe.Wipe(oldSlide, newSlide, GetTransitionOrigin(newSlide), this);
210+
}
206211
else
207212
{
208213
DoStack(newSlide, oldSlide);
209-
oldSlide.Opacity = 0;
210214
}
215+
216+
oldSlide.Opacity = 0;
211217
}
212218
else if (oldSlide != null || newSlide != null)
213219
{

0 commit comments

Comments
 (0)