Category: WPF

ShowDialog() Sucks: Use ApplicationContext and Run Instead

Update Jan 7: Added KeyboardInterop so that TextBoxes will work. One of the lessons learned when making Popups and NotifyIcons in PowerShell and WPF is that the WPF window must be run the the proper context. I was tipped off

Posted in PowerShell, WPF

Adding Toolbar Icons to Your PowerShell WPF GUI

This post builds on some previous post titled Use base64 for Images in WPF-based PowerShell Forms. Show-WpfIconExample.ps1, which can be found below and on github, demonstrates how to overlay the default PowerShell toolbar icon with an image that’s been transformed

Posted in PowerShell, WPF

My Very First Scripting Guys Article: Creating Pop-ups by Using PowerShell

So this happened about a month ago, but I’ve been out with the flu. Ed Wilson with Microsoft Scripting Guys invited me to write a few articles on WPF, and I excitedly said yes! In the first article of the

Posted in PowerShell, Windows, WPF

Use base64 for NotifyIcon in PowerShell

In addition to be able to use base64 for Images in WPF-based PowerShell Forms, you can also use base64 for icons as well. Essentially, you take the base64, convert it to a memory stream, draw an image from that stream,

Posted in PowerShell, WPF

Icon Color Replacement Fun with PowerShell

I like to keep interfaces simple and tend to use icons in my GUI designs. Recently, when making a PowerShell GUI to alert myself to alarm status changes in vCenter, I decided to reuse the same icon over and over

Posted in PowerShell, WPF

Display WPF Popups in Lower Right Corner of Screen using PowerShell

I’ve recently changed my mind on this, but will leave the previous post up in case you want to reposition a WPF popup. If you want a big window to popup in the lower-right corner of the screen, use a

Posted in PowerShell, WPF

Use base64 for Images in WPF-based PowerShell Forms

I’m currently building a notification module to let me know when VMware vCenter alerts go off in my home lab. I plan to share it, and wanted to use a non-standard icon, but didn’t want to require a separate download.

Posted in PowerShell, WPF