mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 11:48:06 +01:00
CmdPal: Fix opening SUI pages in other languages (#38153)
What we were doing only worked in English. The `.ToString` would get you the text of the nav item, not the `Tag` `InvokedItemContainer` gets you the `NavigationViewItem`.
This commit is contained in:
@@ -42,12 +42,8 @@ public sealed partial class SettingsWindow : Window,
|
||||
|
||||
private void NavView_ItemInvoked(NavigationView sender, NavigationViewItemInvokedEventArgs args)
|
||||
{
|
||||
var selectedItem = args.InvokedItem;
|
||||
|
||||
if (selectedItem is not null)
|
||||
{
|
||||
Navigate(selectedItem.ToString()!);
|
||||
}
|
||||
var selectedItem = args.InvokedItemContainer;
|
||||
Navigate((selectedItem.Tag as string)!);
|
||||
}
|
||||
|
||||
private void Navigate(string page)
|
||||
|
||||
Reference in New Issue
Block a user