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

TreeViewItem.IsExpanded in 1.6 behaves inconsistently when repopulating the TreeView #10309

Open
usakgb opened this issue Jan 14, 2025 · 1 comment
Labels
needs-triage Issue needs to be triaged by the area owners

Comments

@usakgb
Copy link

usakgb commented Jan 14, 2025

Describe the bug

When using TreeView's item template and setting TreeViewItem.IsExpanded to True in XAML, repopulating (clearing item and then adding new items) the tree a few times collapses all items.
When binding TreeViewItem.IsExpanded to a read-only property set to True, repopulating the tree randomly collapses/expands the items.
1.5 doesn't have this issue.

Steps to reproduce the bug

A project that demonstrates the bug: https://github.com/usakgb/WinUITreeViewBug

  1. Clone and run the project.
  2. Click Repopulate button a few times.

Expected behavior

All items to be expanded at all times.

Screenshots

Image

NuGet package version

Windows App SDK 1.6.3: 1.6.241114003

Packaging type

Packaged (MSIX)

Windows version

Windows 11 version 22H2 (22621, 2022 Update)

IDE

Visual Studio 2022

Additional context

No response

@microsoft-github-policy-service microsoft-github-policy-service bot added the needs-triage Issue needs to be triaged by the area owners label Jan 14, 2025
@usakgb usakgb changed the title TreeViewItem.IsExpanded in 1.6 behaves inconsistently when repopulating the tree TreeViewItem.IsExpanded in 1.6 behaves inconsistently when repopulating the TreeView Jan 15, 2025
@RDMacLachlan RDMacLachlan added needs-triage Issue needs to be triaged by the area owners and removed needs-triage Issue needs to be triaged by the area owners labels Jan 17, 2025
@RDMacLachlan RDMacLachlan transferred this issue from microsoft/WindowsAppSDK Jan 17, 2025
Copy link

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage Issue needs to be triaged by the area owners
Projects
None yet
Development

No branches or pull requests

2 participants