question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

WinUI 3 - ListBox drag and drop causes a crash

See original GitHub issue

Describe the bug A ListBox is used to display controls that can be dragged and dropped to rearrange the controls. To indicate the drop position the appropriate border of the control where the dragged item will be dropped is changed. Dragging and dropping a different control in a different position a few times will result in a crash with the error message posted below.

Steps to reproduce the bug Steps to reproduce the behavior:

  1. Download the repository here that contains a repro build.
  2. Ensure that the ListViewDragDropIssue (Package) is set as the startup project.
  3. Press F5 to run the project.
  4. Drag and drop a control from one position into another one a few time.
  5. After anywhere between 2 and 5 drag and drop operations a crash will occur.

Expected behavior Application should not crash and allow the user to continue dragging controls for as long as they wish.

Screenshots image

Version Info WinUI 3 Windows App SDK 0.8.1 Packaged Win32 desktop application Windows 11 Pro build 22000.100

NuGet package version: Microsoft.ProjectReunion 0.8.1 Microsoft.ProjectReunion.Foundation 0.8.1 Microsoft.ProjectReunion.WinUI 0.8.1 Microsoft.Windows.CsWinRT 1.3.3 PropertyChanged.Fody 3.4.0

Windows app type:

UWP Win32
Yes
Windows version Saw the problem?
Insider Build (22000.100) Yes
October 2020 Update (19042)
May 2020 Update (19041)
November 2019 Update (18363)
May 2019 Update (18362)
October 2018 Update (17763)
April 2018 Update (17134)
Fall Creators Update (16299)
Creators Update (15063)
Device form factor Saw the problem?
Desktop Yes
Xbox
Surface Hub
IoT

Additional context Does not appear to happen if logic to change the borders ListPage.xaml.cs line 57 - 69 are commented out.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
StephenLPeterscommented, Aug 4, 2021

Awesome!

The listbox issue is very unlikely to get looked at any time soon as we no longer want/recommend people use the control.

1reaction
DeadlyEmbracecommented, Aug 4, 2021

Just gave it a try and it fulfills my needs perfectly. Thanks for pointing it out 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

Drag and Drop with ListView WPF failed using ItemSource
I have ListView with ItemSource: public ObservableCollection<MyObject> List;. And my ListView is full with several object. ... At this line:
Read more >
WPF: Does dragging and dropping data outside ...
I'm implementing Drag-And-Drop within a ListBox. ... r/csharp • 3 yr. ago ... and dropping data outside the application (accidentally) cause a crash?...
Read more >
Implement Drag and Drop Between TreeView and ListBox
The goal of this tutorial is to show you how to implement drag and drop between RadTreeView and ListBox. The final result should...
Read more >
C# - Styling a ListBox - YouTube
In this video I demonstrate how to restyle the material design list box to match a look provided from a user. Playing around...
Read more >
Visual Studio 2022 version 17.0 Release Notes
Fixes a crash when invalid input is sent to the driver used during PGO training for kernel mode drivers. Fixed an issue in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found