WindowsCommunityToolkit icon indicating copy to clipboard operation
WindowsCommunityToolkit copied to clipboard

App Crash with GridSplitter Control in combination with a ListView

Open odp-remec opened this issue 2 years ago • 3 comments

Describe the bug

WinUI 3 application throws an exception when you move the GridSplitter Control. This happens if you use a GridSplitter in combination with a ListView or a TreeView.

Regression

No response

Reproducible in sample app?

  • [X] This bug can be reproduced in the sample app.

Steps to reproduce

1. Create a new WinUI3 Desktop Project (Blank App, Packaged)
2. Add CommunityToolkit.WinUI.UI.Controls nuget package (Version 7.1.2)
3. Edit MainWindow.xaml and add one ListView and one GridSplitter inside a Grid.
4. Add enough ListViewItems (e.g. 50) for the error to occur

Expected behavior

GridSplitter can be moved without any exception or crash of the application.

Screenshots

SplitterAndListViewCrash

Windows Build Number

  • [ ] Windows 10 1809 (Build 17763)
  • [ ] Windows 10 1903 (Build 18362)
  • [ ] Windows 10 1909 (Build 18363)
  • [ ] Windows 10 2004 (Build 19041)
  • [ ] Windows 10 20H2 (Build 19042)
  • [ ] Windows 10 21H1 (Build 19043)
  • [ ] Windows 11 21H2 (Build 22000)
  • [ ] Other (specify)

Other Windows Build number

Windows 10 21H2 (Build 19044)

App minimum and target SDK version

  • [ ] Windows 10, version 1809 (Build 17763)
  • [ ] Windows 10, version 1903 (Build 18362)
  • [ ] Windows 10, version 1909 (Build 18363)
  • [ ] Windows 10, version 2004 (Build 19041)
  • [ ] Other (specify)

Other SDK version

No response

Visual Studio Version

2022

Visual Studio Build Number

Version 17.2.5

Device form factor

Desktop

Nuget packages

  • CommunityToolkit.WinUI.UI.Controls (7.1.2)
  • Microsoft.Windows.SDK.BuildTools (10.0.22000.194)
  • Microsoft.WindowsAppSDK (1.1.1)

Additional context

Sample Application: Splitter.zip

Help us help you

Yes, but only if others can assist.

odp-remec avatar Jun 30 '22 09:06 odp-remec

Hello odp-remec, thank you for opening an issue with us!

I have automatically added a "needs triage" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible. Other community members may also look into the issue and provide feedback 🙌

ghost avatar Jun 30 '22 09:06 ghost

@odp-remec can you try the new version of GridSplitter we have from Labs? See Preview Packages for setting up the Toolkit Labs feed, and then use the CommunityToolkit.Labs.WinUI.SizerBase package. That one has at least be rebuilt and tested for the cursor change on top of WinUI 3 with WinAppSDK 1.0.3 (we haven't been able to update our labs environment to 1.1.x yet).

michael-hawker avatar Jul 07 '22 18:07 michael-hawker

@michael-hawker thank you for your reply. I tested the new version of GridSplitter from CommunityToolkit.Labs.WinUI.SizerBase Version 0.0.2 on my sample project. Unfortunately the error is also present there.

odp-remec avatar Jul 13 '22 10:07 odp-remec

This bug has been fixed in the latest version of Winui (Winui 3 v1.1.4). For more information, see this post: https://github.com/microsoft/microsoft-ui-xaml/issues/7101

epy-remec avatar Aug 12 '22 12:08 epy-remec

fixed in v1.1.4 of Microsoft.WindowsAppSDK

odp-remec avatar Aug 16 '22 06:08 odp-remec