add image logic

This commit is contained in:
MyDrift 2024-08-11 19:56:04 +02:00
parent e6e449af94
commit cdf36857c5

View File

@ -222,6 +222,17 @@ function Invoke-WPFUIElements {
$sync[$entryInfo.Name] = $toggleButton $sync[$entryInfo.Name] = $toggleButton
} }
"Image" {
$image = New-Object Windows.Controls.Image
$image.Name = $entryInfo.Name
$image.Source = $entryInfo.Content
$image.Height = $theme.ImageHeight
$image.Width = $theme.ImageWidth
$image.HorizontalAlignment = "Center"
$image.Margin = $theme.ImageMargin
$stackPanel.Children.Add($image) | Out-Null
}
"Combobox" { "Combobox" {
$horizontalStackPanel = New-Object Windows.Controls.StackPanel $horizontalStackPanel = New-Object Windows.Controls.StackPanel
$horizontalStackPanel.Orientation = "Horizontal" $horizontalStackPanel.Orientation = "Horizontal"