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

Fix RelativePanel implementation #16769

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

SlimeNull
Copy link

@SlimeNull SlimeNull commented Aug 22, 2024

What does the pull request do?

Fix RelativePanel implementation

What is the current behavior?

Now RelativePanel has the same behavior as WinUI3

What is the updated/expected behavior with this PR?

Test the sample code mentioned in #16768

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

Completely re-implement RelativePanel

Checklist

Breaking changes

None

Obsoletions / Deprecations

None

Fixed issues

Fixes #16768

@maxkatz6
Copy link
Member

Does WinUI also have RelativePanel tests? It would be useful to port too. We don't have enough of them https://github.com/AvaloniaUI/Avalonia/blob/1f886594ee6a7585758c9694f6e620a100079c13/tests/Avalonia.Controls.UnitTests/RelativePanelTests.cs

@cla-avalonia
Copy link
Collaborator

cla-avalonia commented Aug 22, 2024

  • All contributors have signed the CLA.

@SlimeNull
Copy link
Author

@cla-avalonia agree

@SlimeNull
Copy link
Author

I'm still testing the behavior about RelativePanel

@SlimeNull
Copy link
Author

@maxkatz6 There seems be a layout issue in Avalonia

Here, we try to arrange a control in a rect (0, 0, 0, 20), which means the area has no space.

image

But the control was still rendered. It should be clipped.

image

In WPF, that's totally ok:

image

Was Avalonia designed from the ground up with a different layout logic than WPF? Or, is this just a bug?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RelativePanel contains the wrong implementation
3 participants