It’s a very slick toolkit, right? Not only that, but it works on Windows, Linux, and Mac OS X … unlike what I’m about to show you, which works only where PowerShell works …
So, I’m curious if anyone would like something like that for PowerShell … and more to the point, how many people would be interested in it, and whether anyone would be willing to help write it (because exposing all of the properties of the various controls is going to require a lot of repetitive coding).
What would it look like in PowerShell?
# These lines are the same (#2 uses aliases)
New-Button "Push Me" | Out-WPF
button "Push Me" | Wpf
# Again, these lines are the same (#2 uses aliases)
"A bed of clams", "A coalition of cheetahs", "A gulp of swallows" | New-Button | New-Stack | Out-Wpf
"A bed of clams", "A coalition of cheetahs", "A gulp of swallows" | Button | Stack | Wpf
As a disclaimer, I copied the examples here from the Shoes tutorial I mentioned earlier, which is why they’re slightly kooky (Why The Lucky Stiff is a strange guy), and why I suggested you go read it before you read this. Of course, although these demos do work —and it’s all skinable and themeable— this is practically all that works in my demo, so don’t go thinking I’ve got a whole Shoes implementation for PowerShell.
"A bed of clams", "A coalition of cheetahs", "A gulp of swallows" | Button -margin 2 | Stack -margin 8 -background red | Wpf
I’m just trying to gauge the interest level — so if you’re interested, please comment below and let me know that you want it, what sorts of things you want it for (if you can think of any off the top of your head), and/or how involved you’d like to be. I’d love for someone to say: “Wow, that’s a great idea, I’m going to go finish it”, but anything short of that, right down to “I’d give you $5 to write it and give it away” is acceptable
One final note: the Out-Wpf cmdlet that you see here does work in v1 and v2 and can even do this (click for the full picture):
I’ll release that later this week…
I’ve released a full script-based version of this. While it does everything you see above and more, it does not work in PowerShell 1. You can get an idea of how to use it by following the PowerBoots tutorial, and you can download PowerBoots, but for now it requires v2 CTP3. Let me hear from you if v1 support is important to ya.