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

Poke UIElement Z-Index when a container is being recycled in ReorderGridAnimation #1459

Merged
merged 1 commit into from
Aug 31, 2017

Conversation

robmikh
Copy link
Contributor

@robmikh robmikh commented Aug 31, 2017

Due to the way XAML handles item container recycling in virtualized lists, simply setting the ImplicitAnimations property on the backing visual to null in the recycled case produces undesirable behavior when adding and removing items. Without getting too into XAML implementation details, containers that will be recycled are stored off screen and when they are reused for a new item the item will fly into their new position from the upper left. The solution is to force XAML to disable the implicit animations for that commit by poking the UIElement's Z-Index. We planned to fix the sample in the WindowUIDevLabs that also has this issue but that hasn't made it to the repo yet.

@robmikh
Copy link
Contributor Author

robmikh commented Aug 31, 2017

Ok, I think I got it right this time! This is what I get for trying to be clever and not using GitHub's built in tools. 😅

@IbraheemOsama
Copy link
Member

@nmetulev Up to you to merge

@nmetulev nmetulev merged commit 2f745dc into CommunityToolkit:staging Aug 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants