2 ms·
Really? Would love to see a binding for Powershell. Just for cross-platform shell scripts to be able to disable a pop-up for input etc. Just makes them more acc
by Pet_Ant 2y ago
Really? Would love to see a binding for Powershell. Just for cross-platform shell scripts to be able to disable a pop-up for input etc. Just makes them more accessible.
- shakna 2y agoThat would be WPF. It uses Tk under the covers.
- shakna 2y agoAh, my bad. It is inspired by Tk. Should still be usable across most things today.
- Pet_Ant 2y agoI believe that has been removed in later versions as the old examples I find online don't work in Powershell > InvalidOperation: Unable to find type System.Windows.Forms.MessageBoxButtons].
- shakna 2y agoThis still works today for me: Add-Type -AssemblyName PresentationFramework [XML]$form = @" <Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" Title="MainWindow" Height="450" Width="800"> <Grid> </Grid> </Window> "@ $NR = (New-Object System.Xml.XmlNodeReader $form) $window = [Windows.Markup.XamlReader]::Load($NR) $window.ShowDialog()