I'm trying to use jpgs for button images in a Powershell form. I tried this code:
#Add Image to Button
$image = New-Object System.Windows.Controls.Image
$image.Source = "C:\users\Administrator\Desktop\Avengers.jpg"
$image.Stretch = 'Fill'
$button.Content = $image
From: http://learn-powershell.net/2012/10/01/powershell-and-wpf-buttons/
The script is throwing an error: Cannot find type[System.Controls.Image]: Make sure the assembly containing this type is loaded.
I tried to use another assembly from the script to figure this one out: [void][reflection.assembly]::Load('System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089')
I'm stuck on version, culture, and PublicKeyToken (I started the script in Powershell Studio, but I'm finishing it in Notepad++). How can I best get this information?
Thank you.