Repository navigation
Description
Current behavior
If the AutoSuggestBox is included in a NavigationView pane and the visibility of the AutoSuggestBox is controlled by a binding, then the space it occupies does not collapse when it disappears. Additionally if the NavigationView pane collapses, the search icon appears indicating a field that does not appear when it is expanded.
Expected behavior
When the AutoSuggestBox collapses the space it occupies also collapses and when the NavigationView pane collaapses no search icon is shown.
How to reproduce it (as minimally and precisely as possible)
Open the attached solution and compile it.
Execute it in any head.
In the attached solution you can show and hide the AutoSuggestBox using a ToogleButton and if the NavigationView pane is collapsed without the AutoSuggestBox you can see the search icon.
Workaround
No known workaround.
Works on UWP/WinUI
No
Environment
Uno.WinUI / Uno.WinUI.WebAssembly / Uno.WinUI.Skia
NuGet package version(s)
4.7.44
Affected platforms
WebAssembly, Android, Skia (WPF), Windows
IDE
Visual Studio 2022
IDE version
17.5.1
Relevant plugins
No response
Anything else we need to know?
No response
Activity
Youssef1313 commentedon Mar 13, 2023
@Suriman I guess you forgot to upload the repro?
Suriman commentedon Mar 13, 2023
@Youssef1313 I can't upload it because of a error in GitHub. I have sent it to Sasha by Teams.
ADD-David-Antolin commentedon Mar 16, 2023
Removing height attribute here seems to do the trick.
[-]The AutoSuggestBox in NavigationView does not collapse when hidden.[/-][+]`AutoSuggestBox` in `NavigationView` does not collapse when hidden[/+]ADD-Noureddine-Maachi commentedon May 27, 2025
Any updates about this?
NavigationView#21054test: Reproduce AutoSuggestBox not collapsing in NavigationView
MartinZikmund commentedon Apr 8, 2026
Repro generator
Runtime test(s) added in branch
dev/mazi/repro/11660:src/Uno.UI.RuntimeTests/Tests/Microsoft_UI_Xaml_Controls/Given_NavigationView.cs→When_AutoSuggestBox_Collapsed_Space_Should_CollapseVisibility=Collapsed, and verifies the AutoSuggestBox takes zero height. The original issue also mentions a search icon appearing in the collapsed pane state — that aspect is visual and not covered by this test.