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

Do not copy UWP behavior with ListBoxItem horizontal alignment #7183

Merged
merged 1 commit into from
Dec 17, 2021

Conversation

maxkatz6
Copy link
Member

@maxkatz6 maxkatz6 commented Dec 17, 2021

What is the current behavior?

In Default theme default ListBoxItem horizontal alignment is Stretch. Same as in WPF.
In Fluent theme we copy UWP behavior and set Left value instead. Note, newer WinUI versions use Stretch as well.

Why is it a problem?

https://stackoverflow.com/questions/43094395/how-to-stretch-listviewitem-in-listview
microsoft/microsoft-ui-xaml#1402

What is the updated/expected behavior with this PR?

Do not override default value in theme. Which makes it "Stretch" value (HorizontalAlignment enum default value).

Breaking changes

Technically it is a styling breaking change.

@robloo
Copy link
Contributor

robloo commented Dec 17, 2021

Yea, anyone using WinUI 2 library or WinUI 3 will have stretch as the default. That was a surprisingly difficult conversation and it represents perfectly everything wrong with WinUI development these days: microsoft/microsoft-ui-xaml#1402

Anyway, seeing this simple commit with no fuss because everyone knows its better is so refreshing.

Copy link
Member

@jmacato jmacato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah this makes more sense :) Let's wait for @danwalmsley 's approval before merging

@robloo
Copy link
Contributor

robloo commented Dec 17, 2021

Here is my analysis of breaking changes. Bottom line, extremely minimal.

microsoft/microsoft-ui-xaml#1402 (comment)

@jmacato jmacato merged commit 7b00b78 into master Dec 17, 2021
@jmacato jmacato deleted the listboxitem-do-not-set-alignment branch December 17, 2021 10:55
@jmacato
Copy link
Member

jmacato commented Dec 17, 2021

got approval from @danwalmsley :)

danwalmsley pushed a commit that referenced this pull request Dec 20, 2021
…ment

Do not copy UWP behavior with ListBoxItem horizontal alignment
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.

4 participants