One of the neat new features in Visual Studio 2005 is expansions which assist you in generating code by inserting templates which you can fill in quickly using less keystrokes than would typically be required. The way they work is that you type a well known  snippet name into the code base – snippets integrate with intellisense so the IDE prompts you to a certain extent (you can also press CTRL-K, CTRL-X with C# IDE settings to get a list of expansions).

Prop1

Once you find the expansion you want you just hit TAB-TAB and it inserts the template for you to fill in. You navigate around the template filling in the fields using the TAB key and simply typing in the next that you want.

Prop2

You can see from the screenshot above that this expansion puts in a simple property – this is a killer feature, how much time do you waste defining properties, even if you are like lightning at the keyboard. The best thing is that you can create your own or customise existing ones. Expansions are language specific, so, if your poison is C# then you can look in this directory:

  • C:\Program Files\Microsoft Visual Studio 8\VC#\Snippets\1033\Visual C#

Alternatively, if you prefer VB.NET, check out this path:

  • C:\Program Files\Microsoft Visual Studio 8\Vb\Snippets\1033

If you open either of those directories you will see a number of *.snippet files. These are XML files which use mark up the snippet to support the TAB navigation (among other things). The mark-up is pretty straight forward. One of my first additions to snippets was my own “prop” expansion, “mdprop”.

This does a few things – first, it stops you having to define the field name and property name seperately (there is only one thing to type in), it prepends a “m_” wart onto the field – and prefixes the field access in the get/set accessors with “this.”. If this is the style you like to use then you can download the expansion here.

Prop3

Another cool thing about expensions is that you don’t need to restart the IDE to use them – it picks up new ones, and modifications to existing ones immediately.

Prop4

There – that fits in with my coding style a little better. And I guess thats the point. Expansions/snippets are all about matching your personal coding style. If what comes out of the box doesn’t match the way you code add or modifiy the set – although I would recommend keeping a back up so you can copy them back in when you rebuild your machine.

To know why, you only need to look at this screenshot.

VSComplete

The Windows Forms designer is getting all grown up now. The picture below is a feature that you would have seen in earlier BETA versions of Visual Studio 2005, but I thought I would post up about it anyway.

ControlAlignment

This feature allows you to drag controls onto the design surface and they get spaced (from the border and from each other) according to some Windows UI guidelines. This is great because I see so many applications that don’t make the effort to get little things like this right and they come off looking half baked.

I’ve been a long time customer of NewsGator, I used their original product and I have a license for their Outlook Edition. Today I rebuilt my machine so that I could testing out Visual Studio 2005 BETA 2 and I needed to download and install NewsGator again.

In the past it was relitively easy to find the download, but the new layout for their homepage is hopeless. I challenge you to sit someone down and tell them to find the Outlook edition of the product (not just marketing material – I want the download to use with the key that I already have).

I actually resorted to using Google to find an old reference to it. There are no obvious links from the homepage (that I can see). Now – I know they are trying to emphasise their online and enterprise subscription services but how about a little bit of support for your long time users. I was so annoyed by the whole experience that I actually went and downloaded RSS Bandit.

The point is that NewsGator made a big withdrawl from the goodwill account tonight and the only reason that they got installed on my machine is that I value my unified messaging client (Outlook).

For your reference the download URL can be found here. Given that Greg Reinacker posted up about the BETA of the new version the product can’t be dying – it’s just hiding.

One of the neat new features in Visual Studio 2005 is expansions which assist you in generating code by inserting templates which you can fill in quickly using less keystrokes than would typically be required. The way they work is that you type a well known  snippet name into the code base – snippets integrate with intellisense so the IDE prompts you to a certain extent (you can also press CTRL-K, CTRL-X with C# IDE settings to get a list of expansions).

Prop1

Once you find the expansion you want you just hit TAB-TAB and it inserts the template for you to fill in. You navigate around the template filling in the fields using the TAB key and simply typing in the next that you want.

Prop2

You can see from the screenshot above that this expansion puts in a simple property – this is a killer feature, how much time do you waste defining properties, even if you are like lightning at the keyboard. The best thing is that you can create your own or customise existing ones. Expansions are language specific, so, if your poison is C# then you can look in this directory:

  • C:\Program Files\Microsoft Visual Studio 8\VC#\Snippets\1033\Visual C#

Alternatively, if you prefer VB.NET, check out this path:

  • C:\Program Files\Microsoft Visual Studio 8\Vb\Snippets\1033

If you open either of those directories you will see a number of *.snippet files. These are XML files which use mark up the snippet to support the TAB navigation (among other things). The mark-up is pretty straight forward. One of my first additions to snippets was my own “prop” expansion, “mdprop”.

This does a few things – first, it stops you having to define the field name and property name seperately (there is only one thing to type in), it prepends a “m_” wart onto the field – and prefixes the field access in the get/set accessors with “this.”. If this is the style you like to use then you can download the expansion here.

Prop3

Another cool thing about expensions is that you don’t need to restart the IDE to use them – it picks up new ones, and modifications to existing ones immediately.

Prop4

There – that fits in with my coding style a little better. And I guess thats the point. Expansions/snippets are all about matching your personal coding style. If what comes out of the box doesn’t match the way you code add or modifiy the set – although I would recommend keeping a back up so you can copy them back in when you rebuild your machine.

Just wanted to jump in and let everyone know that I’ve finished installing Visual Studio 2005 BETA two which is now available from MSDN Subscriber Downloads.

The install was pretty straight forward – I’ve got a bit of time before I need to teach a class using Visual Studio.NET 2003 so I opted to install it on my host operating system rather than pop it into a VM. This is the part I love in the release cycle where you have a mostly stable product and each release is getting just that much better.

I’m looking forward to posting a lot more about this new BETA release in the days, weeks and months ahead.

To know why, you only need to look at this screenshot.

VSComplete

Darren was over in Perth and Adelaide this week talking to user group members about IBF (Information Bridge Framework). I’m looking forward to catching the presentation myself. I missed it when he did it in Canberra but I’ve had an opportunity to look over his shoulder while he has been working on it. Tooling aside, it kind of turns the application development model on its head because you start to use your Office suite as an interface to all your enterprise data.

The idea is that you wrap your enterprise data sources in web-services and integrate those services into a unified meta-data model that is exposed via IBF. Client-side components which integrate into your office application as things like research panes and smart tags provide the visual elements. Darren’s actually got some spare time in Sydney and Melbourne so if your organisation is looking for innovative ways of accessing your corporate data then why not get in contact with him via his blog.

The Windows Forms designer is getting all grown up now. The picture below is a feature that you would have seen in earlier BETA versions of Visual Studio 2005, but I thought I would post up about it anyway.

ControlAlignment

This feature allows you to drag controls onto the design surface and they get spaced (from the border and from each other) according to some Windows UI guidelines. This is great because I see so many applications that don’t make the effort to get little things like this right and they come off looking half baked.

I’ve been a long time customer of NewsGator, I used their original product and I have a license for their Outlook Edition. Today I rebuilt my machine so that I could testing out Visual Studio 2005 BETA 2 and I needed to download and install NewsGator again.

In the past it was relitively easy to find the download, but the new layout for their homepage is hopeless. I challenge you to sit someone down and tell them to find the Outlook edition of the product (not just marketing material – I want the download to use with the key that I already have).

I actually resorted to using Google to find an old reference to it. There are no obvious links from the homepage (that I can see). Now – I know they are trying to emphasise their online and enterprise subscription services but how about a little bit of support for your long time users. I was so annoyed by the whole experience that I actually went and downloaded RSS Bandit.

The point is that NewsGator made a big withdrawl from the goodwill account tonight and the only reason that they got installed on my machine is that I value my unified messaging client (Outlook).

For your reference the download URL can be found here. Given that Greg Reinacker posted up about the BETA of the new version the product can’t be dying – it’s just hiding.