Vista: CommandLink Button

Thu, July 13, 2006, 08:57 PM under Windows | Vista
I've been holding back on talking about CommandLink (and other Vista features) becuase I have been waiting for my "productions" to appear on msdn. By productions I mean a few short videos recorded with Camptasia... by the time they have been through bureaucracy cubed though, Vista will probably be on version 3.. LOL.. anyway..

CommandLink is a new style of button in Vista. If you want to see what it looks like, take a trip back to my TaskDialog post.

If you followed the link, you saw those squares with a green arrow and two pieces of text: "instruction" and "text". The "instruction" bit is the normal button text we know and love. The "text" bit is in smaller font and that is where you can add as much detail as you want about the button and its purpose. This is the text that typically today you have to place in a label next to the button or in the button's tooltip. Finally, although in my screenshot you can see the square rectangle around the button, when you hover the mouse away from the button, the rectangle fades away (harder to describe than to see which is why I was waiting for the video to go up before describing these).

Kenny Kerr (C++ guru) demonstrates how to do CommandLinks from native code in his msdn article.

Catherine Heller provided my colleague Eric Nelson here in the UK with some code that lets us use CommandLink from C# code. By bizarre coincidence (or is it outright plagiarism?) I use similar code in my Vista talks :-)

Get the CommandLinkButton code here and remember that this works on Windows Vista only.