-
Notifications
You must be signed in to change notification settings - Fork 787
Add WrapPanel API Spec based on Windows Community Toolkit (WCT) #10858
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
Conversation
…ol for Public Review
|
How about changing |
Not sure I agree, as because "Lined" is in the name, the Line spacing makes more sense, and has context which does not exist with a wrap panel. |
This is discussed previously in AvaloniaUI/Avalonia#18079. I think |
You could do maybe Row spacing, and Item spacing, which may make sense, but HorizontalSpacing and VerticalSpacing is consistent with many other controls, and should still be relevant regardless of orientation. You could also have ItemHorizontalSpacing and ItemVerticalSpacing, which should also be agnostic regardless of the panel's Orientation. |
@mdtauk RowSpacing, and ItemSpacing, make more sense than H/V Spacing, but not as good as LineSpacing. If you set Orientation to Horizontal, the Line is a Column. And ItemHorizontalSpacing and ItemVerticalSpacing is a even worse naming than H/V spacing. First, it's tied to direction, causing confusion when switching Orientation. Second, the word
|
@mdtauk the current behavior of the WrapPanel (which is the same as it is in the Windows Community Toolkit) is that each row's height is calculated from the largest item in that row. You can see that with the random image sizes in the sample gallery:
So, I think that would cover your scenario? Unless I'm misunderstanding. But it should be called out within the spec somewhere on these expectations. |
|
@zxbmmmmmmmmm thanks to the link to the Avalonia discussion, that's useful context. I'll take a look. |
Can the items stretch to match the height of the tallest item, to fill the "row height"? |
IMO a more complete version of this ask is: |
|
Thanks @neerajmsgithub for the review, I was a bit confused at first until I just referenced existing similar classes in the main idl file ( Also, for future reference, you can make suggestions directly as edits that I could accept in the file with this toolbar button:
That'll also allow me to easily credit your account for the suggestions within the commit. |
Co-authored-by: neerajmsgithub <[email protected]>
…mment about Grid Auto
Added additional note about review commentary for future.
|
@kmahone @neerajmsgithub I've updated the spec based on all review comments, think this should be good to close on. Thanks! |
@Poker-sang sorry, I didn't reply to your comment. It does use Item/LineSpacing naming though, so we'll update to align to it and Avalonia. |
… also expand enum name to be specific to the Panel, as other panels do.
|
Thanks everyone for the great commentary and insights. It's really made a great collaboration here and improving the API surface not just now but for the future as well. I'll merge this and update the code to match, not sure if it'll make experimental4 though. I was hoping to get to that started last week, but I was impacted logistically by the flooding (all is good though). |
…n to released LinedFlowLayout, see discussion #10858 Syncing content from committish 938d1114eaf090e2abc6e187f789c756957701b0
…LinedFlowLayout, see discussion #10858 Syncing content from committish 718be114ad87e2aeec1a7ad95aacaef3bb32f689
|
Oh cool, I can see the PRs got mirrored and me putting the link in the title worked to reference it here! 😊 These updates should both be coming in experimental4 when it drops. 🎉 |







This PR adds the dev and functional spec for WinUI WrapPanel (from Windows Community Toolkit).
Community members can provide feedback by commenting directly on the PR, or through a code suggestion with GitHub tools.
Feedback should be constructive and specific, addressing potential use cases, design concerns, and functionality.
This PR will be open for feedback for a month: October 27th – November 27th
For more info on the public api review process: https://aka.ms/winappsdk/api-specs-review