Disabling Events in ShowUI
Because some things just work better in WPF. Let’s say you had a form that collected a bunch of user input, and then had a button that would fire off some work. We’ll assume that you wanted to prevent people from firing off the work again before they know the results of the first time, [...]
ShowUI: Handling Events and Producing Output
Once you get past the basics of WPF and ShowUI, learning to use nested panels or grids to achieve the layouts you want, and start getting a grip on what controls are available by default, the next step to building useful user interfaces is going to be handling user interactions. In programming, we call those [...]
ShowUI: the tutorial walkthrough
Ok, let’s be clear: you’ve seen this before, and this isn’t going to be the last you’ll see of it, because we’ve got much more in store in ShowUI, but for the first release of ShowUI, it’s obviously time to update this simple walkthrough of building simple user interfaces in PowerShell! An introduction to ShowUI [...]
The problem with calling legacy/native apps from PowerShell
This post is an explanation of the major problems with invoking native apps from PowerShell 2.0, and the simple work-around. There is going to be a little bit of code and then quite a bit of sample output (along with some pointers so you don’t have to play spot the differences). In order to avoid [...]
Goobye CardSpace, hello U-Prove. Does anyone care?
This is just a short rant … so if you don’t care about federated identity, claims-based authentication, OpenID, CardSpace, etc … just skip it. Last week Microsoft publicly admitted that CardSpace is dead. There’s a story about it at Redmond mag which mentions that although they’ve decided not to release CardSpace 2.0, they’re not giving [...]
PowerBoots (Next Generation UI) WPF for PowerShell slides
I gave a LiveMeeting presentation on PowerBoots last week, and these are the slides. I’m sorry to say that the recording did not work out, so you’ll have to wait for the next time I present it to see the demos. Luckily, the demo scripts I used are mostly the samples which are available in [...]
Long-Path Module (Experimental.IO)
Thanks to a late night on my part, and the efforts of the developers on the Microsoft BCL project who wrote the Experimental.IO LongPath assembly … with no further ado, I present a really basic module for dealing with long file paths. There’s no help yet, and very little error handling. But if you needed [...]
More Custom Attributes for PowerShell (Parameter Transformation)
I wrote a post awhile back about using custom attributes for PowerShell parameter validation but when I did it, I focused on the use of attributes to improve the error messages output by validation (specifically, by: ValidatePattern). There are many other things that can be done with custom attributes. However, PowerShell ships with two base [...]
Parenthesis in PowerShell
I was asked recently to clarify the different uses of parenthesis in PowerShell: I struggle with $myvar.foo vs. ($myvar).foo vs. ($myvar).foo() vs. $myvar.foo(); vs. $myvar.foo(1), etc., etc. How do I know which one to use for which case? And then how to put this output into a write-output statement? There are basically three ways of [...]
How to: Invoke PowerShell and use the results from C#?
One of the questions that comes up a lot about PowerShell lately is how to use it from C#. For the sake of a simple example, I figured it’s past time I post the sort-of … Hello World of PowerShell hosting. I’m going to present this app plus a little bit more at the next [...]