Chapter 38. Building a GUI

 

This chapter covers

  • Using Windows Forms
  • Using WPF and ShowUI
  • Leveraging a GUI

Although PowerShell is obviously all about the command line, there may well be times when you want to create a script that displays a graphical user interface (GUI), perhaps for less technically proficient colleagues or end users. Fortunately, PowerShell is built atop the .NET Framework, which offers not one but two ways of displaying a GUI.

As with some of the other chapters in the latter part of this book, we need to set some expectations. Creating and programming a GUI is pure .NET Framework programming, plain and simple. Entire, massive books exist on the topic, so there’s no way we can cover all that material in this chapter. Instead, we’ll show you how PowerShell connects to these technologies and uses them. If you’d like to explore further, we recommend that you pick up a dedicated book on the topic. One thing we’re going to make sure we cover, though, is some tips for translating the C#-based examples you’ll run into elsewhere (including in Microsoft’s documentation) into PowerShell’s scripting language. That way, as you start to explore beyond the simple examples here, you’ll be ready to leverage the enormous set of examples that other folks have already written.

38.1. WinForms via PowerShell Studio

 
 

38.2. Windows Presentation Foundation (WPF) and ShowUI

 
 

38.3. WinForms vs. WPF

 
 

38.4. Ideas for leveraging a GUI tool

 
 

38.5. Summary

 
 
 
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage
test yourself with a liveTest