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

Unable to move item (drag and drop) inside TreeView in WinUI3 Desktop #2783

Closed
eleanorleffler opened this issue Jun 29, 2020 · 1 comment
Closed
Labels
appModel-win32 Exclusive to WinUI 3 Win32 Desktop apps area-TreeView product-winui3 WinUI 3 issues team-Reach Issue for the Reach team

Comments

@eleanorleffler
Copy link

Describe the bug

We are able to move items around (drag and drop) inside a TreeView in our UWP application.

However, once we switched over to WinUI3 Desktop, we are no longer able to move items around (drag and drop) inside the TreeView.

Steps to reproduce the bug

  1. Clone the WinUI3 Problems DragDropTreeView repository.
  2. Go to the DragDropTreeViewWinUI folder.
  3. Open the DragDropTreeViewWinUI solution in Visual Studio 2019 Preview.
  4. Build and run with Debug x64.
  5. Attempt to drag an item (not the root node) in the TreeView onto another location in the TreeView.
  6. You should see the "not permitted" symbol (circle with slash) as you are dragging over. See Screenshot#1 and Screenshot#2.

Expected behavior

We expect to see the drag indicator change to "Move" and be able to drop items back onto the TreeView.

On the right side of the application, there is the TreeView Actions Log that tracks the drag and drop events to verify what is happening.

We expect to see the same behavior we saw in UWP. See Screenshot#3 and Screenshot#4

Build and run the DragDropTreeViewUWP solution inside the DragDropTreeViewUWP folder to see expected behavior.

Screenshots

DragDropTreeViewCurrentBehavior

Screenshot#1 - Current Behavior

DragDropTreeViewCurrentBehaviorEndResult

Screenshot#2 - Current Behavior End Result

DragDropTreeViewExpectedBehavior

Screenshot#3 - Expected Behavior

DragDropTreeViewExpectedBehaviorEndResult

Screenshot#4 - Expected Behavior End Result

NuGet package version:

[Microsoft.VCRTForwarders.140 1.0.6]
[Microsoft.WinUI 3.0.0-preview1.200515.3]

Targeting:

Target: Universal Windows
Target version: Windows 10, version 1809 (10.0; Build 17763)
Min version: Windows 10, version 1809 (10.0; Build 17763)

Windows 10 version Saw the problem?
Insider Build (xxxxx)
November 2019 Update (18363)
May 2019 Update (18362)
October 2018 Update (17763) Yes
April 2018 Update (17134)
Fall Creators Update (16299)
Creators Update (15063)
Device form factor Saw the problem?
Desktop Yes
Mobile
Xbox
Surface Hub
IoT

Additional context

When we debugged the solution, we noticed that the treeView1_DragItemsCompleted (MainPage.xaml.cs Line 72) does get called.

However, the drop was not allowed so the dropped node is the same as the dragged node.

@msft-github-bot msft-github-bot added the needs-triage Issue needs to be triaged by the area owners label Jun 29, 2020
@StephenLPeters StephenLPeters added area-TreeView appModel-win32 Exclusive to WinUI 3 Win32 Desktop apps team-Controls Issue for the Controls team product-winui3 WinUI 3 issues and removed needs-triage Issue needs to be triaged by the area owners team-Controls Issue for the Controls team labels Jun 29, 2020
@msft-github-bot msft-github-bot added the needs-triage Issue needs to be triaged by the area owners label Jun 29, 2020
@StephenLPeters StephenLPeters added the team-Reach Issue for the Reach team label Jun 29, 2020
@ranjeshj ranjeshj removed the needs-triage Issue needs to be triaged by the area owners label Jul 15, 2020
@jevansaks
Copy link
Member

I've checked in fixes for a few different drag&drop issues in WinUI3, and they'll be in the next preview.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
appModel-win32 Exclusive to WinUI 3 Win32 Desktop apps area-TreeView product-winui3 WinUI 3 issues team-Reach Issue for the Reach team
Projects
None yet
Development

No branches or pull requests

5 participants