2024-10-29 15:51:07 -05:00
|
|
|
function Initialize-InstallAppsMainElement {
|
2024-10-28 16:53:03 -05:00
|
|
|
<#
|
|
|
|
.SYNOPSIS
|
|
|
|
Clears the given WPF Grid and creates a [Windows.Controls.Border] containing a [Windows.Controls.StackPanel]
|
|
|
|
Used to as part of the Install Tab UI generation
|
|
|
|
.PARAMETER TargetGridName
|
|
|
|
The WPF Grid name
|
|
|
|
.OUTPUTS
|
|
|
|
Returns the created [Windows.Controls.StackPanel] element
|
|
|
|
#>
|
|
|
|
param(
|
|
|
|
[Parameter(Mandatory)]
|
|
|
|
[string]$TargetGridName
|
|
|
|
)
|
|
|
|
$targetGrid = $sync.Form.FindName($TargetGridName)
|
|
|
|
$null = $targetGrid.Children.Clear()
|
|
|
|
|
|
|
|
$Border = New-Object Windows.Controls.Border
|
|
|
|
$Border.VerticalAlignment = "Stretch"
|
|
|
|
$Border.SetResourceReference([Windows.Controls.Control]::StyleProperty, "BorderStyle")
|
2024-10-29 15:51:07 -05:00
|
|
|
|
|
|
|
$dockPanel = New-Object Windows.Controls.DockPanel
|
|
|
|
$Border.Child = $dockPanel
|
|
|
|
|
2024-10-28 16:53:03 -05:00
|
|
|
$null = $targetGrid.Children.Add($Border)
|
|
|
|
|
2024-10-29 15:51:07 -05:00
|
|
|
return $dockPanel
|
2024-10-28 16:53:03 -05:00
|
|
|
}
|