From b28344d272296cf74d3c86fa03af2eacab77d412 Mon Sep 17 00:00:00 2001 From: rbalsleyMSFT <53497092+rbalsleyMSFT@users.noreply.github.com> Date: Fri, 20 Mar 2026 14:18:46 -0700 Subject: [PATCH] Convert UI sections to expandable controls Transitions the General Build Options, Build USB Drive Options, and Post-Build Cleanup settings panels into Expander controls to improve interface organization and space management. Removes dynamic visibility toggling for the USB settings section from the backend scripts, allowing the expander to remain visible while child settings are controlled by the primary enable checkbox. --- FFUDevelopment/BuildFFUVM_UI.xaml | 77 +++++++++---------- .../FFUUI.Core/FFUUI.Core.Handlers.psm1 | 3 +- .../FFUUI.Core/FFUUI.Core.Initialize.psm1 | 1 - 3 files changed, 39 insertions(+), 42 deletions(-) diff --git a/FFUDevelopment/BuildFFUVM_UI.xaml b/FFUDevelopment/BuildFFUVM_UI.xaml index 42e8f37..1d73906 100644 --- a/FFUDevelopment/BuildFFUVM_UI.xaml +++ b/FFUDevelopment/BuildFFUVM_UI.xaml @@ -764,34 +764,32 @@ Low - - - - - - - - - - - - - - - + + + + + + + + + + + + + - - + - - - + + + + - - - - + + + + @@ -843,21 +841,22 @@ - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + diff --git a/FFUDevelopment/FFUUI.Core/FFUUI.Core.Handlers.psm1 b/FFUDevelopment/FFUUI.Core/FFUUI.Core.Handlers.psm1 index 9e7acb4..ec9229c 100644 --- a/FFUDevelopment/FFUUI.Core/FFUUI.Core.Handlers.psm1 +++ b/FFUDevelopment/FFUUI.Core/FFUUI.Core.Handlers.psm1 @@ -203,18 +203,17 @@ function Register-EventHandlers { }) # Build USB Drive Settings Event Handlers + # The USB Expander is always visible; the checkbox controls child settings only $State.Controls.chkBuildUSBDriveEnable.Add_Checked({ param($eventSource, $routedEventArgs) $window = [System.Windows.Window]::GetWindow($eventSource) $localState = $window.Tag - $localState.Controls.usbSection.Visibility = 'Visible' $localState.Controls.chkSelectSpecificUSBDrives.IsEnabled = $true }) $State.Controls.chkBuildUSBDriveEnable.Add_Unchecked({ param($eventSource, $routedEventArgs) $window = [System.Windows.Window]::GetWindow($eventSource) $localState = $window.Tag - $localState.Controls.usbSection.Visibility = 'Collapsed' $localState.Controls.chkSelectSpecificUSBDrives.IsEnabled = $false $localState.Controls.chkSelectSpecificUSBDrives.IsChecked = $false $localState.Controls.lstUSBDrives.Items.Clear() diff --git a/FFUDevelopment/FFUUI.Core/FFUUI.Core.Initialize.psm1 b/FFUDevelopment/FFUUI.Core/FFUUI.Core.Initialize.psm1 index 47dd0ff..929165a 100644 --- a/FFUDevelopment/FFUUI.Core/FFUUI.Core.Initialize.psm1 +++ b/FFUDevelopment/FFUUI.Core/FFUUI.Core.Initialize.psm1 @@ -372,7 +372,6 @@ function Initialize-UIDefaults { $State.Controls.chkRemoveUpdates.IsChecked = $State.Defaults.generalDefaults.RemoveUpdates $State.Controls.chkRemoveDownloadedESD.IsChecked = $State.Defaults.generalDefaults.RemoveDownloadedESD $State.Controls.chkVerbose.IsChecked = $State.Defaults.generalDefaults.Verbose - $State.Controls.usbSection.Visibility = if ($State.Controls.chkBuildUSBDriveEnable.IsChecked) { 'Visible' } else { 'Collapsed' } $State.Controls.usbSelectionPanel.Visibility = if ($State.Controls.chkSelectSpecificUSBDrives.IsChecked) { 'Visible' } else { 'Collapsed' } $State.Controls.chkSelectSpecificUSBDrives.IsEnabled = $State.Controls.chkBuildUSBDriveEnable.IsChecked $State.Controls.chkPromptExternalHardDiskMedia.IsEnabled = $State.Controls.chkAllowExternalHardDiskMedia.IsChecked