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

[AutoLayout] Axis Alignment wrong for stretched non-filling elements #1034

Closed
carldebilly opened this issue Feb 6, 2024 · 0 comments · Fixed by #1035
Closed

[AutoLayout] Axis Alignment wrong for stretched non-filling elements #1034

carldebilly opened this issue Feb 6, 2024 · 0 comments · Fixed by #1035
Assignees

Comments

@carldebilly
Copy link
Member

carldebilly commented Feb 6, 2024

Considering the following XAML:

<utu:AutoLayout Background="Blue" Grid.Column="1" Spacing="5" PrimaryAxisAlignment="Stretch">
	<Rectangle Fill="Green" utu:AutoLayout.PrimaryAlignment="Stretch" utu:AutoLayout.CounterAlignment="Stretch" MaxWidth="100" MaxHeight="100" />
</utu:AutoLayout>

Current result

The rectangle will be aligned top-left in the AutoLayout

Expected

  1. We would expect the rectangle to be centered both vertically and horizontally. It's not the case here.
  2. Same result should apply for Width=100 and Height=100

Other

This Playground snippet also illustrate the problem: it should be centered.

image

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