Stacking Up with WPF
Let's continue looking at how to create simple Windows Presentation Foundation (WPF) tools in PowerShell. This is a handy way to give users a graphical interface to run your scripts. WPF can be daunting as it is a complicated .NET developer topic. However, I have found that I can get by with a simple WPF form in many cases. It may not be the fanciest looking, but it is relatively easy to code. I want to show you how to create a stacked panel WPF form.
As I mentioned last time, WPF is based on the idea of layers. You need a base window to begin with.
$window = [System.Windows.Window]@{
Title = 'WPF Window Demo'
Height = 350
Width = 500
WindowStartupLocation = 'CenterScreen'
}
Don't forget you need to load the required assemblies first.
Want to read the full issue?