PowerShell and WPF: Generate Controls from the PS1

Usually when I create a GUI I use and XAML file for my GUI and PS1 for the code. In the XAML I add all my controls. In this post I will show you how to add and generate your Controls directly from the PowerShell script.