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

Expander with PageSlide transition broken #17400

Closed
aguahombre opened this issue Nov 1, 2024 · 3 comments · Fixed by #17411
Closed

Expander with PageSlide transition broken #17400

aguahombre opened this issue Nov 1, 2024 · 3 comments · Fixed by #17411
Labels
bug help-wanted A contribution from the community would be most welcome.

Comments

@aguahombre
Copy link
Contributor

Describe the bug

Using an expander with PageSlide ContentTransition slides the content in the wrong direction when closing the expander.

It looks like commit f13ece4 removed the !forward on Expander.cs line 107

Before...
                if (IsExpanded)
                {
                    ContentTransition.Start(null, visualContent, forward);
                }
                else
                {
                    ContentTransition.Start(visualContent, null, !forward);
                }
After...
                if (IsExpanded)
                {
                    await ContentTransition.Start(null, visualContent, forward, _lastTransitionCts.Token);
                }
                else
                {
                    await ContentTransition.Start(visualContent, null, forward, _lastTransitionCts.Token);
                }

To Reproduce

    <Style Selector="Expander">
      <Setter Property="ContentTransition">
        <Setter.Value>
          <PageSlide Orientation="Horizontal" Duration="0:0:0.25"/>
        </Setter.Value>
      </Setter>
      <Setter Property="ExpandDirection" Value="Right"/>
   </Style>

Expected behavior

The expander content should slide right when opening the expander and back left when closing the expander.

Avalonia version

11.2

OS

Windows

Additional context

No response

@aguahombre aguahombre added the bug label Nov 1, 2024
@timunie
Copy link
Contributor

timunie commented Nov 1, 2024

@aguahombre yeah I think the ! Was removed by accident. Can you file a PR to add it back?

/cc @maxkatz6

@timunie timunie added the help-wanted A contribution from the community would be most welcome. label Nov 1, 2024
@aguahombre
Copy link
Contributor Author

If I get time next week, I can give the PR a go

@Coloryr
Copy link
Contributor

Coloryr commented Nov 2, 2024

Let me make one pr.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug help-wanted A contribution from the community would be most welcome.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants