Building GUI using WPF
In this section, we are going to discuss how to build a windows GUI using WPF and PowerShell. WPF is more modern and provides a lot more flexibility and advanced options than WinForm. Like WinForm, building a GUI in WPF is also an event-driven approach. We define the Form and then add the controls in the form, after we define the events for the Controls so that we can control the behavior of the Form. The difference is in the way UI elements are designed in WPF. Here, we use XAML-based definitions for the UI elements.
There are two ways in which we can build a WPF-based application, either we hand code the XAML definitions or use third-party tools. The most easily available one is Visual Studio 2015, and it provides a great interface. For our use, I will use Visual Studio 2015 Community Edition (it is a free tool). In Visual Studio, we have two options: the first one is to use the Visual Studio interface and the second option is to use Blend for Visual Studio. Using...