Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add BoolTransition #16941

Merged
merged 2 commits into from
Sep 12, 2024
Merged

Add BoolTransition #16941

merged 2 commits into from
Sep 12, 2024

Conversation

dbriard
Copy link
Contributor

@dbriard dbriard commented Sep 5, 2024

What does the pull request do?

The PR add BoolTransition to the list of available transitions.

What is the current behavior?

Currently, there is no BoolTransition.

What is the updated/expected behavior with this PR?

This PR will allow to resolve issues with pane animation, that require to animate IsVisible in a transition.

How was the solution implemented (if it's not obvious)?

BoolAnimator already exist in Avalonia, I just create the BoolTransition class to use it in the same way as other transitions.

public class BoolTransition : Transition<bool>
{
    internal override IObservable<bool> DoTransition(IObservable<double> progress, bool oldValue, bool newValue) => 
        AnimatorDrivenTransition<bool, BoolAnimator>.Transition(Easing, progress, oldValue, newValue);
}

Checklist

Breaking changes

None

Obsoletions / Deprecations

Fixed issues

Fixes #16935

@dbriard dbriard mentioned this pull request Sep 5, 2024
@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.2.999-cibuild0051714-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@maxkatz6 maxkatz6 merged commit 39f4360 into AvaloniaUI:master Sep 12, 2024
8 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Need a BoolTransition
3 participants