From 7678f61480a2fde2476bcfd20a9b081fc8628aca Mon Sep 17 00:00:00 2001 From: rbalsleyMSFT <53497092+rbalsleyMSFT@users.noreply.github.com> Date: Fri, 20 Mar 2026 13:07:40 -0700 Subject: [PATCH 01/30] Updates UI layout to a modern navigation sidebar and adds Fluent theme support Refactors the main window layout to use a sidebar navigation model instead of a standard tab control, improving the overall organization of the application. Introduces support for the Fluent theme (Light, Dark, and System) for users running PowerShell 7.5+ (.NET 9+), gracefully falling back to standard styling for older versions. Adds a new Settings page that allows users to configure the application theme and access helpful documentation and repository links. Standardizes margins, font sizes, and layout choices across all forms to closer match Windows design guidelines. Updates configuration handling to save and restore user theme preferences. --- FFUDevelopment/BuildFFUVM_UI.ps1 | 13 +- FFUDevelopment/BuildFFUVM_UI.xaml | 996 ++++++++++-------- .../FFUUI.Core/FFUUI.Core.Config.psm1 | 10 + .../FFUUI.Core/FFUUI.Core.Handlers.psm1 | 94 ++ .../FFUUI.Core/FFUUI.Core.Initialize.psm1 | 168 ++- FFUDevelopment/config/Sample_default.json | Bin 6254 -> 6310 bytes 6 files changed, 815 insertions(+), 466 deletions(-) diff --git a/FFUDevelopment/BuildFFUVM_UI.ps1 b/FFUDevelopment/BuildFFUVM_UI.ps1 index 7cf7144..c282020 100644 --- a/FFUDevelopment/BuildFFUVM_UI.ps1 +++ b/FFUDevelopment/BuildFFUVM_UI.ps1 @@ -55,7 +55,8 @@ $script:uiState = [PSCustomObject]@{ lastSortProperty = $null; lastSortAscending = $true; isBuilding = $false; - isCleanupRunning = $false + isCleanupRunning = $false; + isFluentSupported = $false }; Defaults = @{}; LogFilePath = "$FFUDevelopmentPath\FFUDevelopment_UI.log" @@ -120,6 +121,9 @@ $reader = New-Object System.IO.StringReader($xamlString) $xmlReader = [System.Xml.XmlReader]::Create($reader) $window = [Windows.Markup.XamlReader]::Load($xmlReader) +# Apply Fluent theme before the window renders (requires PowerShell 7.5+ / .NET 9+) +Initialize-FluentTheme -Window $window -ThemeMode "System" -State $script:uiState + $window.Add_Loaded({ # Pass the state object to all initialization functions $script:uiState.Window = $window @@ -390,8 +394,11 @@ $script:uiState.Controls.btnRun.Add_Click({ # Not currently building: start a new build $btnRun.IsEnabled = $false - # Switch to Monitor Tab - $script:uiState.Controls.MainTabControl.SelectedItem = $script:uiState.Controls.MonitorTab + # Switch to Monitor page via navigation + $monitorIndex = 8 # Monitor is the 9th item (index 8) in the navigation list + if ($null -ne $script:uiState.Controls.lstNavigation) { + $script:uiState.Controls.lstNavigation.SelectedIndex = $monitorIndex + } # Clear previous log data and reset autoscroll if ($null -ne $script:uiState.Data.logData) { diff --git a/FFUDevelopment/BuildFFUVM_UI.xaml b/FFUDevelopment/BuildFFUVM_UI.xaml index ae13f82..42e8f37 100644 --- a/FFUDevelopment/BuildFFUVM_UI.xaml +++ b/FFUDevelopment/BuildFFUVM_UI.xaml @@ -1,59 +1,10 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + xmlns:sys="clr-namespace:System;assembly=mscorlib" Title="FFU Builder UI" + FontSize="14" FontFamily="Segoe UI Variable, Segoe UI" + WindowState="Maximized"> - + @@ -71,240 +22,327 @@ - - - - - - - - - - + + + + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + - -