From af39f43cecdbdcd730300e3caff4411ae7ed05ab Mon Sep 17 00:00:00 2001 From: MyDrift Date: Sat, 28 Sep 2024 02:19:42 +0200 Subject: [PATCH] noimage fix --- functions/public/Invoke-WPFUIElements.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions/public/Invoke-WPFUIElements.ps1 b/functions/public/Invoke-WPFUIElements.ps1 index dc609170..cf0a181f 100644 --- a/functions/public/Invoke-WPFUIElements.ps1 +++ b/functions/public/Invoke-WPFUIElements.ps1 @@ -171,6 +171,7 @@ function Invoke-WPFUIElements { $image.Width = 40 $image.Height = 40 $image.Margin = New-Object Windows.Thickness(0, 0, 10, 0) + $image.Source = $noimage if (-not [string]::IsNullOrEmpty($kaka)) { try { $packageinfo = (choco info $entryInfo.choco --limit-output).Split(' ')[0] @@ -187,9 +188,8 @@ function Invoke-WPFUIElements { } catch { $image.Source = $noimage } - } else { - $image.Source = $noimage } + #$image.Source = $noimage $image.Clip = New-Object Windows.Media.RectangleGeometry $image.Clip.Rect = New-Object Windows.Rect(0, 0, $image.Width, $image.Height)