mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-09-01 19:51:34 +02:00
Dock: update the displays list when navigating to dock settings (#49705)
I opened the settings when my laptop was portable. I docked my laptop to my displays. I navigated to the dock settings. I **expected**: to see all my displays I _actually_: saw only the laptop display ------ the fix: make sure to update the displays when we navigate to the dock settings page, so that we properly show all of them Closes: nope didn't file this
This commit is contained in:
@@ -13,6 +13,7 @@ using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.UI.Xaml;
|
||||
using Microsoft.UI.Xaml.Controls;
|
||||
using Microsoft.UI.Xaml.Documents;
|
||||
using Microsoft.UI.Xaml.Navigation;
|
||||
using Microsoft.Windows.Storage.Pickers;
|
||||
|
||||
namespace Microsoft.CmdPal.UI.Settings;
|
||||
@@ -40,6 +41,12 @@ public sealed partial class DockSettingsPage : Page
|
||||
InitializeSettings();
|
||||
}
|
||||
|
||||
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||
{
|
||||
base.OnNavigatedTo(e);
|
||||
ViewModel.PopulateMonitorConfigs();
|
||||
}
|
||||
|
||||
private void InitializeSettings()
|
||||
{
|
||||
// Initialize UI controls to match current settings
|
||||
|
||||
Reference in New Issue
Block a user