Created
August 27, 2022 09:33
-
-
Save VisualMelon/9d696329467e77988b3e4d80662c03a4 to your computer and use it in GitHub Desktop.
Avalonia immediate transition
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class NoTransition : IPageTransition | |
{ | |
public Task Start(Visual from, Visual to, bool forward, CancellationToken cancellationToken) | |
{ | |
if (from is not null) | |
{ | |
from.IsVisible = false; | |
} | |
if (to is not null) | |
{ | |
to.IsVisible = true; | |
} | |
return Task.CompletedTask; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment