mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 11:48:06 +01:00
[Settings]Add a link to the OOBE What's New page in the Settings menu (#29028)
* Adds a link to the OOBE What's New Section in the ShellPage Navigation * Updated verbiage to code as per recommendation * Updated so that if the Oobe Window is active, clicking on the What's New option in the ShellPage navigates to the What's New page. Added a "SetActiveWindow" Method the OobeWindow to easily open an active window of a set PowerToysModule type - this is to support being able to open the What's New Page without having to close the Oobe Window and close it every time. * Renamed SetActiveWindow to SetAppWindow * Adjusted method and property names for naming consistency across the application * Fixed an oversight. --------- Co-authored-by: Ian Kraynak <iakrayna@microsoft.com>
This commit is contained in:
@@ -7,6 +7,7 @@ using ManagedCommon;
|
||||
using Microsoft.PowerLauncher.Telemetry;
|
||||
using Microsoft.PowerToys.Settings.UI.Helpers;
|
||||
using Microsoft.PowerToys.Settings.UI.Library;
|
||||
using Microsoft.PowerToys.Settings.UI.OOBE.Views;
|
||||
using Microsoft.PowerToys.Settings.UI.Views;
|
||||
using Microsoft.PowerToys.Telemetry;
|
||||
using Microsoft.UI;
|
||||
@@ -112,6 +113,21 @@ namespace Microsoft.PowerToys.Settings.UI
|
||||
App.GetOobeWindow().Activate();
|
||||
});
|
||||
|
||||
// open whats new window
|
||||
ShellPage.SetOpenWhatIsNewCallback(() =>
|
||||
{
|
||||
if (App.GetOobeWindow() == null)
|
||||
{
|
||||
App.SetOobeWindow(new OobeWindow(Microsoft.PowerToys.Settings.UI.OOBE.Enums.PowerToysModules.WhatsNew, App.IsDarkTheme()));
|
||||
}
|
||||
else
|
||||
{
|
||||
App.GetOobeWindow().SetAppWindow(OOBE.Enums.PowerToysModules.WhatsNew);
|
||||
}
|
||||
|
||||
App.GetOobeWindow().Activate();
|
||||
});
|
||||
|
||||
// open flyout
|
||||
ShellPage.SetOpenFlyoutCallback((POINT? p) =>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user