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

UniformGridLayout (FlowLayout): Fix issue with scrolling up creating gaps in layout #3393

Conversation

marcelwgn
Copy link
Collaborator

Description

The issue was that the Generate(Backward) logic was faulty. When trying to generate the previous line, the next item was placed entirely to the right, however when having multiple items per row, this is not correct. That's why the UniformGridLayout ended up with single column content when scrolling up. The updated behavior is to take the last extent into account to place the last item of the previous row.

Motivation and Context

Closes #1887

How Has This Been Tested?

Add new interaction test.

Screenshots (if appropriate):

@ghost ghost added the needs-triage Issue needs to be triaged by the area owners label Oct 8, 2020
@StephenLPeters StephenLPeters added area-ItemsRepeater team-Controls Issue for the Controls team and removed needs-triage Issue needs to be triaged by the area owners labels Oct 8, 2020
@ranjeshj
Copy link
Contributor

ranjeshj commented Mar 9, 2021

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).


<!-- The DataTemplate used: CircularTemplate-->

<DataTemplate x:Key="CircularTemplate" x:DataType="x:String">
Copy link
Contributor

Choose a reason for hiding this comment

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

is this circular ?

{
this.InitializeComponent();
for (int i = 0; i < 40; ++i)
collection.Add(i.ToString());
Copy link
Contributor

Choose a reason for hiding this comment

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

could be simplified by just setting it in line 17.. using Enumerable.Range(0, 40)

IsVerticalScrollChainingEnabled="False"
AutomationProperties.Name="RepeaterScrollViewer"
MaxHeight="500">
<controls:ItemsRepeater x:Name="UniformGridRepeater"
Copy link
Contributor

Choose a reason for hiding this comment

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

curious if this would be easier to see if you set vertical cache to 0

@marcelwgn
Copy link
Collaborator Author

@ranjeshj Would you like me to address your comments or rather merge as is?

@ranjeshj
Copy link
Contributor

ranjeshj commented Mar 9, 2021

@ranjeshj Would you like me to address your comments or rather merge as is?

Yes please. They were minor feedback, so if you can resolve them, that would be great and I don't expect those to cause new failures.

@marcelwgn
Copy link
Collaborator Author

Added them now.

@ranjeshj
Copy link
Contributor

ranjeshj commented Mar 9, 2021

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

@StephenLPeters StephenLPeters left a comment

Choose a reason for hiding this comment

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

:shipit:

@StephenLPeters StephenLPeters merged commit 7d1c1c7 into microsoft:master Mar 12, 2021
carldebilly added a commit to unoplatform/uno that referenced this pull request Apr 9, 2021
carldebilly added a commit to unoplatform/uno that referenced this pull request Apr 12, 2021
carldebilly added a commit to unoplatform/uno that referenced this pull request Apr 26, 2021
carldebilly added a commit to unoplatform/uno that referenced this pull request Apr 27, 2021
Kinnara added a commit to Kinnara/ModernWpf that referenced this pull request Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-ItemsRepeater team-Controls Issue for the Controls team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Setting MaximumRowsOrColumns property of UniformGridLayout causes holes and crashes in ItemsRepeater.
3 participants