Operating on a ListView control that uses VirtualizangWrapPanel will cause the view to automatically slide to the top
Open
Nobody has claimed this yet.
bug
- Dominant language
- C#
- Stars
- 9.6k
- Forks
- 1k
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
using VirtualizangWrapPanel on ListView.ItemsPanel, When I select an item in the ListView, the listview will automatically slide to the top
To Reproduce
<ListView ItemsSource="{Binding StorageItems}">
<ListView.ItemsPanel>
<ItemsPanelTemplate>
<ui:VirtualizingWrapPanel ItemSize="320,230" />
</ItemsPanelTemplate>
</ListView.ItemsPanel>
<ListView.ItemTemplate>
<DataTemplate>
<StackPanel Width="320">
<Image Width="320"
Height="160"
Stretch="UniformToFill"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Source="{Binding Thumbnail}" />
<TextBlock Text="{Binding Name}"
TextWrapping="Wrap"
TextTrimming="CharacterEllipsis" />
</StackPanel>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
Expected behavior
The interface will not automatically slide to the top
Screenshots
No response
OS version
Windows 11 23H2 22631.3235
.NET version
.NET 8
WPF-UI NuGet version
3.0.0
Additional context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with the provided ListView XAML, VirtualizingWrapPanel, and item selection on the stated WPF, Windows, and .NET versions. Trace the selection and scrolling behavior around the VirtualizingWrapPanel, and consider the issue done when selecting an item no longer moves the view to the top.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100