winutil/functions/public/Invoke-WPFMaximizeButton.ps1

11 lines
372 B
PowerShell
Raw Normal View History

function Invoke-WPFMaximizeButton {
<#
.SYNOPSIS
Alternates between Maximized and Minimized window
#>
if ($sync["Form"].WindowState -eq [System.Windows.WindowState]::Maximized) {
$sync["Form"].WindowState = [System.Windows.WindowState]::Normal
} else {
$sync["Form"].WindowState = [System.Windows.WindowState]::Maximized
}
}