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

[WinUI] CollectionView GridItemsLayout Shows 6 Columns Even When Span is Set to 7, When Display Scale is Set to 125% or 150% #23684

Closed
turdmaggot opened this issue Jul 18, 2024 · 4 comments
Labels
area-controls-collectionview CollectionView, CarouselView, IndicatorView migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert platform/windows 🪟 s/needs-attention Issue has more information and needs another look s/triaged Issue has been reviewed t/bug Something isn't working

Comments

@turdmaggot
Copy link

Description

In Windows, when display scale is set to 125% or 150%, CollectionView shows 6 columns even though the GridItemsLayout's span attribute is set to 7. It behaves properly when display scale is set back 100%.

Steps to Reproduce

  1. Create a CollectionView.
  2. Add GridItemsLayout as ItemsLayout. Set the following attributes:
  • Orientation="Vertical"
  • HorizontalItemSpacing="5"
  • VerticalItemSpacing="5"
  • Span="7"
  1. Add a DataTemplate as ItemTemplate, with any control. Preferrably a box with borders with 145x100 in size.
  2. Bind it to an itemsource, with about 35 items.
  3. Run the Project in Windows.
  4. Assuming that your display scale is set to 100% (by default), it should display a 7 columns and 5 rows.
  5. Change display scale by going to System/Display/Scale & Layout and look for the scale dropdown. Set it to either 125% or 150%.

Actual Result: A Grid with 6 Columns
image

Expected Result: A Grid with 7 Columns
image

Link to public reproduction project repository

No response

Version with bug

8.0.60 SR6

Is this a regression from previous behavior?

Yes, this used to work in Xamarin.Forms

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

Windows SDK 10.0.22621.0

Did you find any workaround?

No

Relevant log output

No response

@turdmaggot turdmaggot added the t/bug Something isn't working label Jul 18, 2024
Copy link
Contributor

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@PureWeen PureWeen added migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert area-controls-collectionview CollectionView, CarouselView, IndicatorView platform/windows 🪟 s/needs-info Issue needs more info from the author s/needs-repro Attach a solution or code which reproduces the issue and removed s/needs-info Issue needs more info from the author labels Jul 18, 2024
@Damus765
Copy link

This appears to be a duplicate of #23233.

@dotnet-policy-service dotnet-policy-service bot added s/needs-attention Issue has more information and needs another look and removed s/needs-repro Attach a solution or code which reproduces the issue labels Jul 20, 2024
@ninachen03
Copy link

@turdmaggot
Could you provide a sample project for us to investigate it further?
Looking forward to your reply!

@ninachen03 ninachen03 added the s/triaged Issue has been reviewed label Aug 13, 2024
@jfversluis
Copy link
Member

Duplicate of #23233

@jfversluis jfversluis marked this as a duplicate of #23233 Aug 13, 2024
@jfversluis jfversluis closed this as not planned Won't fix, can't repro, duplicate, stale Aug 13, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Sep 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-controls-collectionview CollectionView, CarouselView, IndicatorView migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert platform/windows 🪟 s/needs-attention Issue has more information and needs another look s/triaged Issue has been reviewed t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants