-
Notifications
You must be signed in to change notification settings - Fork 693
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
TreeView does not respect initial SelectedItem when initialized #10120
Comments
I think this is happening because the treeview control is not loaded yet! Therefore, instead of setting the selectedItem in the constructor, set it in the page loaded event |
Sorry about that. Fixed the link.
The |
I understand that they are different controls, but I think they should have consistency on basic behaviors. |
Loaded event working fine for me!
|
Thanks for confirming it but I guess the |
Therefore you should create a new issue and mentation that ctor is not working in treeview |
Describe the bug
I created a reproducible project here but is something like the following:
As you can see, the
TreeView
control is not respecting the boundSelectedItem
right after it's initialized. It should have "Item 2" selected. And you can also see that the binding is not broken.20241030-1431-52.8086650.mp4
Steps to reproduce the bug
Use the repo above.
Expected behavior
TreeView
respectsSelectedItem
when loaded.Screenshots
No response
NuGet package version
WinUI 3 - Windows App SDK 1.6.1: 1.6.240923002
Windows version
Windows Insider Build (xxxxx)
Additional context
No response
The text was updated successfully, but these errors were encountered: