Question

We can use [Windows.Markup.XamlReader]::Load to load XAML file in PowerShell, but is there some way to specify some PowerShell script as code behind?

Was it helpful?

Solution

Now there is also WPK, in the PowerShellPack which makes creating WPF UI in PowerShell extremely straightforward and fun.

OTHER TIPS

While I don't know for sure, I would guess not. Given that Visual Studio only exposes C# and VB as languages to use to build WPF applications, that implies that work needs to be done at the tool level in order to add support for WPF to a language. Since a .NET language doesn't get WPF support "for free", it's doubtful that PowerShell has the ability to be the code behind for a WPF UI.

The current place to look at is http://showui.codeplex.com/SourceControl/list/changesets.

Sorry Show-UI has no release yet. It is the successor to PowerBoots and WPK.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top