Skip to content
This repository was archived by the owner on Feb 25, 2026. It is now read-only.
This repository was archived by the owner on Feb 25, 2026. It is now read-only.

New ListViewBase extensions - SmoothScrollIntoView #1499

Closed

Description

@Vijay-Nirmal

SmoothScrollIntoView extensions allow scrolling the item into the view with animation.

smoothscrollintoviewsampleoutput

Properties

Properties Type Description
Index int Index of the item to be scrolled
ItemPosition Enum Specify the position of the Item after scrolling
DisableAnimation bool To disable the scrolling animation
ItemPosition Description
Default If visible then it will not scroll, if not then the item will be aligned to the nearest edge
Left Aligned left
Top Aligned top
Centre Aligned centre
Right Aligned right
Bottom Aligned bottom

Sample code - SmoothScrollingHelper

Activity

  1. IbraheemOsama commented on Sep 18, 2017

    @IbraheemOsama
    Member

    Seems interesting to me :) maybe we can also include delay in scroll so the developer can control the scroll speed. let see what the community members think

  2. michael-hawker commented on Sep 18, 2017

    @michael-hawker
    Member

    Based on discussions on this topic I've had, you probably want to make the ScrollIfVisibile a Boolean to separate it from where to scroll the object to. e.g. you may want to scroll the item to the center, but only if it's not already visible.

  3. Vijay-Nirmal commented on Sep 19, 2017

    @Vijay-Nirmal
    ContributorAuthor

    @IbraheemOsama We should add 'Speed' (pixels per second) instead for 'Delay' or 'Duration'. So the duration of the animation will be (Math.Abs(previousOffset - newPosition)*1000)/speed. Also, we could have MaxDuration property to override calculated duration if it exceeds MaxDuration.

    @michael-hawker I like the idea and it would be easy to do.

    I am sorry guys. I can't create a PR for this because I don't think I have enough knowledge to do it. I have never created a helper or control other than for my own use.

  4. IbraheemOsama commented on Sep 20, 2017

    @IbraheemOsama
    Member

    @Vijay-Nirmal everyone had this moment of 'First PR' :) when I created a gitHub account I didn't have any previous PR :P
    Submit a PR and we'll help and share the knowledge through reviewing the PR.

  5. nmetulev commented on Sep 26, 2017

    @nmetulev
    Contributor

    @Vijay-Nirmal, please let us know if you would be able to submit a PR for this. Most of us would be more than happy to help :)

  6. Vijay-Nirmal commented on Sep 27, 2017

    @Vijay-Nirmal
    ContributorAuthor

    Thanks, but I don't think I have enough knowledge about UWP development. I am sorry I can't create a PR for this. But in the future, when I am well versed in UWP development, I will create a PR to create a different feature.

  7. thecodrr commented on Oct 7, 2017

    @thecodrr
    Contributor

    @nmetulev I can take a look at this as soon as possible, if you want? This will be an exciting adventure.

  8. nmetulev commented on Oct 7, 2017

    @nmetulev
    Contributor

    Feel free to take this one @theweavrs

  9. added
    help wantedIssues identified as good community contribution opportunities
    on Oct 19, 2017
  10. nmetulev commented on Oct 24, 2017

    @nmetulev
    Contributor

    @theweavrs, were you planing on implementing this one? If so, I'll set the milestone for 2.1

  11. Vijay-Nirmal commented on Jan 4, 2018

    @Vijay-Nirmal
    ContributorAuthor

    @nmetulev I will do it.

    When I build the solution it gives me errors and warnings. I didn't change any code.

    devenv_2018-01-04_17-31-07

    Here is the full error list

    Error List pdf

  12. nmetulev commented on Jan 4, 2018

    @nmetulev
    Contributor

    That's great @Vijay-Nirmal.

    This is a known issue with the new design project. We believe it's a VS/NuGet bug and those errors can be safely ignored.

  13. 40 remaining items

  14. Vijay-Nirmal commented on Mar 11, 2020

    @Vijay-Nirmal
    ContributorAuthor
  15. michael-hawker commented on Apr 4, 2020

    @michael-hawker
    Member

    @Vijay-Nirmal can you summarize what items are you waiting on from me at the moment? It sounds like you worked around most of your sample app issues?

    If you're pretty close to completeness, can you open a Draft PR with the changes? It'll make it easier to review and point-out any assistance with any open questions you have as well.

    Thanks!

  16. Vijay-Nirmal commented on Apr 5, 2020

    @Vijay-Nirmal
    ContributorAuthor

    @michael-hawker I have created Draft PR #3222. I have two questions

    1. I am using invisible TextBlock to create the properties in Properties Panel. Is it ok to do it?

    https://github.com/windows-toolkit/WindowsCommunityToolkit/blob/9ad0b20029c9266d0f3d162520fe549a9a9243fe/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/ListViewExtensions/ListViewExtensionsXaml.bind#L20-L21
    https://github.com/windows-toolkit/WindowsCommunityToolkit/blob/9ad0b20029c9266d0f3d162520fe549a9a9243fe/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/ListViewExtensions/ListViewExtensionsPage.xaml.cs#L32-L33

    1. Not working properly when using ItemsStackPanel as ItemsPanel. See SmoothScrollingHelper#1 for more details. I don't think it is the problem of the virtualized panel because ItemsWrapGrid works properly.

    ItemsStackPanel

  17. removed this from the future milestone on Jun 19, 2020
  18. ghost removed
    help wantedIssues identified as good community contribution opportunities
    on Jun 19, 2020
  19. added this to the 7.0 milestone on Jun 19, 2020
  20. modified the milestones: 7.0, 7.1 on Mar 2, 2021
  21. ghost locked as resolved and limited conversation to collaborators on Nov 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions