Windowscommunitytoolkit: Investigate: Default WrapPanel behavior Changed?

Created on 24 Nov 2020  路  4Comments  路  Source: windows-toolkit/WindowsCommunityToolkit

_Originally Reported by Spyromaniac on the UWP Community Discord Server_

_Originally posted by @michael-hawker in https://github.com/windows-toolkit/WindowsCommunityToolkit/issues/3471#issuecomment-732480382_

3471 may have changed the default behavior for WrapPanel? We had a user expecting to see Sample App behavior (6.1.x):

image

But saw their items centered in the rows instead (vs. top aligned) w/ 8.0.0-preview3 (based off our 7.0.0 code):

image

We should investigate if this default behavior has changed, and if anything document the behavior update. This should only effect scenarios of different sized items and is resolved by setting the VerticalContentAlignment property.

FYI @vgromfeld

bug controls documentation good first issue help wanted need more info

Most helpful comment

The default value for the VerticalAlignment is Stretch (MSDN).
This is what is changing the behavior. Now that we are using the row height to arrange all the items, the default Stretch alignment is centering them if they height is smaller than the row height.
We can add a note in the documentation.

All 4 comments

Hello michael-hawker, thank you for opening an issue with us!

I have automatically added a "needs triage" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible. Other community members may also look into the issue and provide feedback 馃檶

@michael-hawker This seems like a stackoverflow issue. I'm guessing the content they are using has a VerticalAlignment of center

@skendrot could be, it was resolved for them in chat, but I just wanted to double-check and validate that we're not accidently changing the default behavior between v6 and v7. Figured it'd be a good testing intro for someone to pick-up if they're looking for something simpler to get their feet wet with the Toolkit.

The default value for the VerticalAlignment is Stretch (MSDN).
This is what is changing the behavior. Now that we are using the row height to arrange all the items, the default Stretch alignment is centering them if they height is smaller than the row height.
We can add a note in the documentation.

Was this page helpful?
0 / 5 - 0 ratings