-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
[WrapPanel] Add Spacing Properties #18079
base: master
Are you sure you want to change the base?
Conversation
You can test this PR using the following package version. |
In the UWP/WinUI community toolkit naming if these properties was discussed and decided as https://learn.microsoft.com/en-us/windows/communitytoolkit/controls/wrappanel#properties Horizontal/Vertical terminology is more general-purpose (can apply to other controls) and fits well with existing properties for alignment. |
@robloo I was going to use that name, but after careful consideration I realized:
So after weighing them, I choose to use |
@Poker-sang You've thought this through more than I thought and more than what was decided in the toolkit. I think the logic for your point 1 above is the strongest argument. With controls that have an orientation property -- itself with horizontal/vertical -- that is a complication. It would be nice to be able to set the Spacing and just have it work and make sense for all orientations. Let me think about this a bit more. I suspect you're right though. |
@robloo I was also like you at the beginning but am mostly sold on it for this control. Take StackPanel, it has only Spacing and will lead to the same results regardless of the orientation. That should be the same here imo. But the team also needs to agree on it |
I'm basically sold that we shouldn't be using H/V Spacing terminology for the above mentioned reasons. Additional thoughts I've had on naming these properties are:
So bottom line, we could align with existing controls/properties more if we changed the wording:
Edit: On second thought, "Row" does have an orientation implied. "Line" might make more sense for both orientations as a line could either be horizontal or vertical. |
What does the pull request do?
Add ItemSpacing and LineSpacing Properties for WrapPanel
What is the current behavior?
WrapPanel has no spacing properties
What is the updated/expected behavior with this PR?
How was the solution implemented (if it's not obvious)?
Checklist
Breaking changes
Obsoletions / Deprecations
Fixed issues