Quantcast
Viewing latest article 9
Browse Latest Browse All 34

PowerShell ISE addon menu generator – The ShowUI way

Update: @Jaykul was kind enough to review this code and post an updated (and better) version of this addon with guidelines & best practices. Don’t forget to read the first few lines of text on that page to learn the best practices when scripting WPF UI. A while ago, I wrote about a PowerShell ISE addon that can be used to add items to ISE and load them dynamically by adding the same to ISE profile. This used WinForms to generate the GUI required for the addon functionality. As you may know already, ShowUI 1.1 is available for creating WPF UI in PowerShell. So, I decided to re-write this addon to use ShowUI. Here is the new code: [crayon-5ac4783bb79a9118986627/] The WinForms implementation of this addon had 235 lines of PowerShell code. Where as, ShowUI version has only 48 lines! This shows that the value per line of PowerShell code is amazing when using ShowUI. ShowUI really makes it easy. Thanks to James Brundage and Joel Bennett. Now, to use this addon: Copy the contents of above script …

Viewing latest article 9
Browse Latest Browse All 34

Trending Articles