Skip to content

ListBox ScroolIntoView implementation behavior is not consistent to native ListBox behavior #4392

@vladimir-krestov

Description

@vladimir-krestov
  • .NET Core Version: 6.0
  • Have you experienced this same bug with .NET Framework?: No

Problem description:

  • ListBox ScrollIntoView implementation is more complicates than it need to be - it scrolls an item to the bottom of a ListBox
    1

Expected behavior:

  • ListBox should have the same behavior as in .NET Framework or Win32 - scroll an item to the top of a ListBox
    2

Minimal repro:

  • Create a .NET 6.0 app
  • Add a ListBox to the app
  • Add some items to the ListBox (e.g. 10 items)
  • Set a size for the ListBox to see a part of the items and see a vertical scrollbar
  • Run the app and use Inspect to call ScrolIntoView method
  • Compare with .NET Framework behavior

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions