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 does not handle IsExpanded binding correctly #10140

Open
GochenRyan opened this issue Nov 6, 2024 · 3 comments
Open

TreeViewItem does not handle IsExpanded binding correctly #10140

GochenRyan opened this issue Nov 6, 2024 · 3 comments
Labels
area-TreeView bug Something isn't working product-winui3 WinUI 3 issues team-Controls Issue for the Controls team

Comments

@GochenRyan
Copy link

GochenRyan commented Nov 6, 2024

Describe the bug

After clicking the Collapse button (which sets the IsExpanded property of all bound data items to False), then clicking the Expand button (which sets the IsExpanded property of all bound data items to True), not all TreeViewItem elements fully expand.

Steps to reproduce the bug

  1. Clone https://github.com/GochenRyan/WinUI3TreeViewBug
  2. Checkout commit 7272036ec4013931b2a483e537b8f1bf2d952227
  3. Set ExpandBug as startup project
  4. Build and run

Expected behavior

All TreeViewItem elements fully expand.

Screenshots

Image

NuGet package version

WinUI 3 - Windows App SDK 1.6.1: 1.6.240923002

Windows version

Windows Insider Build (xxxxx)

Additional context

No response

@GochenRyan GochenRyan added the bug Something isn't working label Nov 6, 2024
Copy link

github-actions bot commented Nov 6, 2024

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!

Closed similar issues:

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

@microsoft-github-policy-service microsoft-github-policy-service bot added the needs-triage Issue needs to be triaged by the area owners label Nov 6, 2024
@GochenRyan
Copy link
Author

I used await Task.Delay(10); to give the UI enough time to generate containers. Is there a more elegant solution?
https://github.com/GochenRyan/WinUI3TreeViewBug/commit/193ad23e2eae6a7e89a0b849bc5ef387729a03d1#diff-2c9f4b3bf90a766d4225bf2a93bfa5de5749d667e8bedd95faf2ac842d1a4fbdR104

@karkarl
Copy link
Contributor

karkarl commented Nov 7, 2024

FYI, this bug seems to have persisted since WinUI2 (#2112).

@karkarl karkarl added area-TreeView 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 labels Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-TreeView bug Something isn't working product-winui3 WinUI 3 issues team-Controls Issue for the Controls team
Projects
None yet
Development

No branches or pull requests

2 participants