Files
winutil/functions/private/Show-WPFInstallAppBusy.ps1
KamaleiZestri d005a225a2 NoUI mode and Concurrency edits (#4092)
* Autorun changes

* Missed a handle

* Remove todo

---------

Co-authored-by: Chris Titus <dfm.titus@gmail.com>
2026-02-22 17:28:55 -06:00

22 lines
953 B
PowerShell

function Show-WPFInstallAppBusy {
<#
.SYNOPSIS
Displays a busy overlay in the install app area of the WPF form.
This is used to indicate that an install or uninstall is in progress.
Dynamically updates the size of the overlay based on the app area on each invocation.
.PARAMETER text
The text to display in the busy overlay. Defaults to "Installing apps...".
#>
param (
$text = "Installing apps..."
)
Invoke-WPFUIThread -ScriptBlock {
$sync.InstallAppAreaOverlay.Visibility = [Windows.Visibility]::Visible
$sync.InstallAppAreaOverlay.Width = $($sync.InstallAppAreaScrollViewer.ActualWidth * 0.4)
$sync.InstallAppAreaOverlay.Height = $($sync.InstallAppAreaScrollViewer.ActualWidth * 0.4)
$sync.InstallAppAreaOverlayText.Text = $text
$sync.InstallAppAreaBorder.IsEnabled = $false
$sync.InstallAppAreaScrollViewer.Effect.Radius = 5
}
}