NavigationView Bug
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 9.6k
- Forks
- 1k
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
Set the SelecteItem of NavigationView to {get; set;}
When I implement multilingual switching now, when I reload the specified language, the selection of any method does not take effect, and can only take effect through the control's name Navigate on the first attempt
As soon as I switched languages, I reassigned the new object to MenuItem Source to achieve language switching
When switching languages and rewriting to load new menu items, I set the corresponding TYPE through Navigate to not take effect,
If I can put out SelecteItem, I can manually bind it to customize the selection,
Otherwise, the control name will have to be used for the first selection every time, and multiple selections cannot be set
Just to declare, I only used the NavigationView control. If the control can be detached from the architecture, it will be more flexible to use
Also, NavigationView AutoSuggestBox is not working for some unknown reason
To Reproduce
<menu:NavigationView.AutoSuggestBox>
<menu:AutoSuggestBox Margin="8,0,8,8" PlaceholderText="{lang:Loc 搜索}" />
</menu:NavigationView.AutoSuggestBox>
</menu:NavigationView>
Expected behavior
If the selected items can be bound, the selected problem can be solved, but the AutoSuggestBox problem is unknown because only the control was used without any code operation
Screenshots
No response
OS version
.net 9 win11
.NET version
.net 9 win11
WPF-UI NuGet version
Additional context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported behavior with the provided WPF NavigationView markup, focusing on MenuItemsSource, language switching, and the AutoSuggestBox. Inspect the NavigationView and AutoSuggestBox entry points to determine whether selected-item binding and search behavior are supported. Done means the selection can be controlled after menu replacement and the reported AutoSuggestBox behavior is understood or fixed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100