From cdf36857c5c4343775f7c1d898ad541636e4b304 Mon Sep 17 00:00:00 2001 From: MyDrift Date: Sun, 11 Aug 2024 19:56:04 +0200 Subject: [PATCH] add image logic --- functions/public/Invoke-WPFUIElements.ps1 | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/functions/public/Invoke-WPFUIElements.ps1 b/functions/public/Invoke-WPFUIElements.ps1 index be928538..abc5740b 100644 --- a/functions/public/Invoke-WPFUIElements.ps1 +++ b/functions/public/Invoke-WPFUIElements.ps1 @@ -222,6 +222,17 @@ function Invoke-WPFUIElements { $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" { $horizontalStackPanel = New-Object Windows.Controls.StackPanel $horizontalStackPanel.Orientation = "Horizontal"