mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 04:07:40 +02:00
[Settings]Fix using navigation items in scan mode (#22545)
This commit is contained in:
@@ -36,6 +36,7 @@
|
|||||||
IsTitleBarAutoPaddingEnabled="False"
|
IsTitleBarAutoPaddingEnabled="False"
|
||||||
PaneClosed="NavigationView_PaneClosed"
|
PaneClosed="NavigationView_PaneClosed"
|
||||||
PaneOpened="NavigationView_PaneOpened"
|
PaneOpened="NavigationView_PaneOpened"
|
||||||
|
SelectionChanged="NavigationView_SelectionChanged"
|
||||||
SelectedItem="{x:Bind ViewModel.Selected, Mode=OneWay}">
|
SelectedItem="{x:Bind ViewModel.Selected, Mode=OneWay}">
|
||||||
<NavigationView.Resources>
|
<NavigationView.Resources>
|
||||||
<SolidColorBrush
|
<SolidColorBrush
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using Microsoft.PowerToys.Settings.UI.Helpers;
|
||||||
using Microsoft.PowerToys.Settings.UI.Services;
|
using Microsoft.PowerToys.Settings.UI.Services;
|
||||||
using Microsoft.PowerToys.Settings.UI.ViewModels;
|
using Microsoft.PowerToys.Settings.UI.ViewModels;
|
||||||
using Microsoft.UI.Xaml;
|
using Microsoft.UI.Xaml;
|
||||||
@@ -225,5 +226,15 @@ namespace Microsoft.PowerToys.Settings.UI.Views
|
|||||||
{
|
{
|
||||||
await Launcher.LaunchUriAsync(new Uri("https://aka.ms/powerToysGiveFeedback"));
|
await Launcher.LaunchUriAsync(new Uri("https://aka.ms/powerToysGiveFeedback"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void NavigationView_SelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args)
|
||||||
|
{
|
||||||
|
NavigationViewItem selectedItem = args.SelectedItem as NavigationViewItem;
|
||||||
|
if (selectedItem != null)
|
||||||
|
{
|
||||||
|
Type pageType = selectedItem.GetValue(NavHelper.NavigateToProperty) as Type;
|
||||||
|
NavigationService.Navigate(pageType);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user