mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2024-11-24 11:55:31 +00:00
Fix Bug where Scrollviewer dosnt work
This commit is contained in:
parent
cf2f741408
commit
e0e8daf4e2
@ -1,4 +1,4 @@
|
|||||||
function Initialize-AppStackPanel {
|
function Initialize-InstallAppsMainElement {
|
||||||
<#
|
<#
|
||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
Clears the given WPF Grid and creates a [Windows.Controls.Border] containing a [Windows.Controls.StackPanel]
|
Clears the given WPF Grid and creates a [Windows.Controls.Border] containing a [Windows.Controls.StackPanel]
|
||||||
@ -18,9 +18,11 @@ function Initialize-AppStackPanel {
|
|||||||
$Border = New-Object Windows.Controls.Border
|
$Border = New-Object Windows.Controls.Border
|
||||||
$Border.VerticalAlignment = "Stretch"
|
$Border.VerticalAlignment = "Stretch"
|
||||||
$Border.SetResourceReference([Windows.Controls.Control]::StyleProperty, "BorderStyle")
|
$Border.SetResourceReference([Windows.Controls.Control]::StyleProperty, "BorderStyle")
|
||||||
$StackPanel = New-Object Windows.Controls.StackPanel
|
|
||||||
$Border.Child = $StackPanel
|
$dockPanel = New-Object Windows.Controls.DockPanel
|
||||||
|
$Border.Child = $dockPanel
|
||||||
|
|
||||||
$null = $targetGrid.Children.Add($Border)
|
$null = $targetGrid.Children.Add($Border)
|
||||||
|
|
||||||
return $StackPanel
|
return $dockPanel
|
||||||
}
|
}
|
@ -7,9 +7,6 @@ function Initialize-InstallHeader {
|
|||||||
The Parent Element into which the Header should be placed
|
The Parent Element into which the Header should be placed
|
||||||
#>
|
#>
|
||||||
param($TargetElement)
|
param($TargetElement)
|
||||||
$dockPanel = New-Object Windows.Controls.DockPanel
|
|
||||||
$TargetElement.Children.Add($dockPanel)
|
|
||||||
|
|
||||||
function New-WPFButton {
|
function New-WPFButton {
|
||||||
param (
|
param (
|
||||||
[string]$Name,
|
[string]$Name,
|
||||||
@ -88,5 +85,5 @@ function Initialize-InstallHeader {
|
|||||||
$sync.$($selectedAppsButton.Name) = $selectedAppsButton
|
$sync.$($selectedAppsButton.Name) = $selectedAppsButton
|
||||||
|
|
||||||
[Windows.Controls.DockPanel]::SetDock($wrapPanelTop, [Windows.Controls.Dock]::Top)
|
[Windows.Controls.DockPanel]::SetDock($wrapPanelTop, [Windows.Controls.Dock]::Top)
|
||||||
$null = $dockPanel.Children.Add($wrapPanelTop)
|
$null = $TargetElement.Children.Add($wrapPanelTop)
|
||||||
}
|
}
|
@ -9,9 +9,9 @@ function Invoke-WPFUIApps {
|
|||||||
|
|
||||||
switch ($TargetGridName) {
|
switch ($TargetGridName) {
|
||||||
"appspanel" {
|
"appspanel" {
|
||||||
$mainStackPanel = Initialize-AppStackPanel -TargetGridName $TargetGridName
|
$dockPanel = Initialize-InstallAppsMainElement -TargetGridName $TargetGridName
|
||||||
$null = Initialize-InstallHeader -TargetElement $mainStackPanel
|
$null = Initialize-InstallHeader -TargetElement $dockPanel
|
||||||
$sync.ItemsControl = Initialize-InstallAppArea -TargetElement $mainStackPanel
|
$sync.ItemsControl = Initialize-InstallAppArea -TargetElement $dockPanel
|
||||||
Initialize-InstallCategoryAppList -TargetElement $sync.ItemsControl -Apps $Apps
|
Initialize-InstallCategoryAppList -TargetElement $sync.ItemsControl -Apps $Apps
|
||||||
}
|
}
|
||||||
default {
|
default {
|
||||||
|
Loading…
Reference in New Issue
Block a user