AutoSuggestBox shouldn't be sealed, or NavigationView.AutoSuggestBox should allow templatization #9221
Labels
area-AutoSuggestBox
bug
Something isn't working
duplicate
This issue or pull request already exists
team-Controls
Issue for the Controls team
Describe the bug
AutoSuggestBox is sealed and therefore disallows derived classes. The AutoSuggestBox property on the NavigationView requires an AutoSuggestBox and cannot be templatized. Title bar customization is only enabled on Windows 11. Therefore, an app that supports Windows 10 as well as 11 and wants to provide search functionality in the title bar will likely duplicate their ASB in the title bar and in the NavigationView, and enable one or the other depending on OS support. This means any customization and logic used by the ASB will be duplicated in both locations.
Ideally we'd create a user control containing an ASB, or a derived ASB class. But we can do neither in this case.
Steps to reproduce the bug
Read the documentation
Expected behavior
We should be able to user either a UserControl or a derived ASB class.
Screenshots
No response
NuGet package version
WinUI 3 - Windows App SDK 1.4.3: 1.4.231115000
Windows version
Windows 11 (22H2): Build 22621
Additional context
No response
The text was updated successfully, but these errors were encountered: