-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
Completed 🔥bug 🐛An unexpected issue that highlights incorrect behaviorAn unexpected issue that highlights incorrect behaviorcontrols 🎛️improvements ✨
Milestone
Description
Describe the bug
In the past, we didn't have a hard dependency on WinUI. It looks like the ListDetailsView then does 'hacks' to look it up in the Visual Tree to do better integration with the back button.
We should instead, now that we have a dependency on WinUI, just use the strongly-typed FindAscendent method and clean this code up. I think other spots where it registers to events or things could also be simplified.
Steps to Reproduce
WindowsCommunityToolkit/Microsoft.Toolkit.Uwp.UI.Controls.Layout/ListDetailsView/ListDetailsView.cs
Line 202 in 9444484
| _navigationView = this.FindAscendants().FirstOrDefault(p => p.GetType().FullName == "Microsoft.UI.Xaml.Controls.NavigationView"); |
Expected behavior
Not use hard-coded strings to find things. 🙂
@XAML-Knight did you want to pick this one up?
Metadata
Metadata
Assignees
Labels
Completed 🔥bug 🐛An unexpected issue that highlights incorrect behaviorAn unexpected issue that highlights incorrect behaviorcontrols 🎛️improvements ✨