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:
Mike Griese
2026-08-06 11:38:09 -05:00
committed by GitHub
parent 558e633c59
commit 15df4db8f2

View File

@@ -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