Best ways of implementing GUI, ShowUI vs WinForms vs WPF

I’ve been researching many different ways of implementing a GUI in powershell, including:

  1. ShowUI
  2. .NET Windows Forms
  3. WPF
WPF seems to look the most athletically pleasing but is the most difficult/complex to use. What would you guys recommend to use going forward?

For background information, I wish to build a GUI with multiple tabs and buttons inside each tab. Anything to make it more athletically pleasing (like it was made in 2019 and not 2008) would be helpful.

Have a read of Stephen Owen’s series on creating GUIs using Visual Studio. It will get you up and running with WPF in no time.

https://foxdeploy.com/2015/04/10/part-i-creating-powershell-guis-in-minutes-using-visual-studio-a-new-hope/

[quote quote=163235]Have a read of Stephen Owen’s series on creating GUIs using Visual Studio. It will get you up and running with WPF in no time.

Part I – Creating PowerShell GUIs in Minutes using Visual Studio – A New Hope

[/quote]
It doesn’t seem too bad so far. Thank you for the link, I hadn’t come across that site in my research.

Could you explain to me what the purpose of these lines are? Why are they web links?

xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"

It’s used to give the XML namespace a unique name:
https://www.w3schools.com/xml/xml_namespaces.asp

[quote quote=163296]It’s used to give the XML namespace a unique name:

https://www.w3schools.com/xml/xml_namespaces.asp

[/quote]
I’ve got a Textbox, declared as:

x:Name="Welcome_Text" HorizontalAlignment="Left" Height="24" Margin="288,9,0,0" TextWrapping="Wrap" Text="Welcome!" VerticalAlignment="Top" Width="197"

When I’m in the Visual Studio Code debugger, I see a TON of attributes associated with this variable and just about all of them read “<Error retrieving property - InvalidOperationException>” as the value. I assumed that was because I hadn’t defined them in the above XAML, but when I found the “Text” attribute, my “Welcome!” was not there, but instead the same error. How can this be? When the form appears, it indeed displays the desired text and I’m able to change the value just fine.

What’s going on here?