Hide Category title if empty

This commit is contained in:
Marterich
2024-05-18 23:28:38 +02:00
parent 2354645b47
commit f453534f74
2 changed files with 27 additions and 3 deletions

View File

@ -77,7 +77,10 @@ function Get-TabXaml {
$panelcount++
}
}
$blockXml += "<Label Content=""$($category -replace '^.__', '')"" FontSize=""16""/>`n"
$categorycontent = $($category -replace '^.__', '')
# Remove all special Characters from the name because it will later be used as a Powershell Variable
$categoryname = "WPFLabel"+$($categorycontent -replace '[^a-zA-Z0-9]','')
$blockXml += "<Label Name=""$categoryname"" Content=""$categorycontent"" FontSize=""16""/>`n"
$sortedApps = $organizedData[$panel][$category].Keys | Sort-Object
foreach ($appName in $sortedApps) {
$count++