I feel I should point out that because of the way this module is written, there is essentially no help available for the various commands (mostly because those commands don’t really exist, they’re all just aliases to the same New-WpfElement function).

In order to make up for this as much as possible, I have provided at Get-BootsHelp function which takes an element name (eg: Window, Button, etc) and opens the MSDN documentation for that type, which includes links to all the information about the properties and events represented by the PowerBoots parameters.

To get a complete list of PowerBoots elements, you can run Get-BootsCommand, but be aware that the elements are generated dynamically from the *.Proxies.txt files in the module folder, so you can easily add your own either following the naming convention for the files (Module^Namespace.Proxies.txt), and listing the types you want proxied inside, or by calling Add-BootsFunction with another assembly or specific classes.

PowerBoots 0.1 – The Async Release (On CodePlex)

This is my favorite release of PowerBoots so far, even though for the first time I am breaking backwards compatibility with your existing scripts. I’m sorry about that, but I promise it’s for the best, and will result in better performance and features in the future, as well as causing less confusion going forward — because it means new support for PowerShell 1.0 for the main cmdlets (and all the new features in this release support v1) with support in other areas coming soon…

  • Added support for any parameter to be a script block (hopefully this won’t backfilre)
  • Added PoshWpf compiled module:
    • Added New-BootsWindow which now takes over the “Boots” alias (sorry everyone).
      • Main feature: New-BootsWindow has a -Async parameter which puts the GUI in it’s own thread!
      • Breaking change: everything that goes into the window must be created in a script-parameter
    • Added Get-BootsWindow to help you keep track of all those threaded windows
    • Added Remove-BootsWindow to give you a way to get rid of windows (don’t forget to do this)
  • Added Add-BootsTemplate and Remove-BootsTemplate to add Styles and Templates and DataTemplates. These are a bit like FormatData, but for PowerBoots :)

To show you just how cool this can get, I’ve included a single theme from the codeplex wpfthemes project called DavesGlossy. I removed a few things so it’s not as slick as the one on CodePlex, but it doesn’t depend on WPFToolkit

Future plans

This is by far not the last release of this module. I’ve kept the version number low primarily because I’m pretty sure that I will still need to make some significant changes. I have an idea to make the full ‘boots syntax work on PowerShell 1.0, and to clean up the syntax for animations, events, and attached properties. Once I get it working in v1.0 we should even be able to make it have proper help functionality.

Older Releases

Remember STA mode

PowerBoots is a .Net GUI framework. As such, it requires Single Threaded Apartment mode, as opposed to the Multi-Threaded Apartment mode that PowerShell defaults too. In these older script-only versions, you have to start PowerShell with the -STA switch for it to work. There aren’t really any noticeable downsides to running PowerShell this way, so my current recommendation is that you simply edit your PowerShell shortcut and append a -STA to the end of the command line. For a discussion of the differences, see the MSDN page on processes, threads, and apartments.

PowerBoots – The Image Output Release (Download7z) ( 2009-01-16 )

  • Added Out-BootsImage – use it instead of Out-Boots when you just want a screengrab of the Window’s contents. Can output to file or clipboard … the perfect way to generate images from Visifire charts.

PowerBoots – Tab Completion Release (Download7z) ( 2009-01-14 )

  • Fixed bug when running in Set-StrictMode -Version 2
  • Refactored the aliases into functions based on a script-block (to get parameter tab-complete)
  • Added the Add-BootsFunction function which allows importing new types…
  • Added the Add-BootsContentProperty as well as Remove and Get verbs to allow modifying the default properties that PowerBoots recognizes — add these BEFORE you add new classes.

PowerBoots – Bugfix Release (Download7z) ( 2009-01-07 )

  • Fixed weird error when running “Get-Command” (it crashes getting New-ObjectFromAlias)
  • Added explicit error (and aborted load) when running in MTA mode
  • Further cleaned up Alias handling so that under “normal” conditions we have no errors

PowerBoots – Bugfix Release ( 2009-01-07 )

  • REMOVED Set-StrictMode because it affects end-users’s event-handler scripts.
  • Modified default SizeToContents so that it doesn’t override manually set -Width or -Height
  • Removed the on-load message about the Grid alias error which doesn’t show up anymore
  • Renamed New-WpfElement to New-ObjectFromAlias to better reflect what it is …
  • Cleaned up Alias handling (so we no longer overwrite the built-in “Grid” alias)

PowerBoots – Tutorial Release ( 2009-01-07 )

  • Adds the Out-Boots function, and matches the initial version of the tutorial walkthrough
  • Adds support for pipelining the content to most elements
  • Adds the Get-BootsParam function to list possible parameters for each element
  • Adds the Get-BootsHelp function to open the MSDN page for each element type
  • Lots of bugfixes and refactoring… :P

PowerBoots – Initial Release ( 2009-01-05 )

The first public release of the PowerBoots script module for PowerShell 2 CTP3.

5 thoughts on “PowerBoots”

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

You can do more than breathe for free…