views:

62

answers:

3

I'm looking for some template examples, such as a C# windows dialog.

Do many hackers take advantage of template files? There are times when I'm creating dialog forms that are very similar. I want to make all my forms look and behave consistently, without doing a lot of coping and pasting.

Add New Item -> My Templates
A: 

There are lots of C# code snippets around. They will provide scaffolding for different structures (properties, dispose pattern and more).

Here is one source.

Oded
cool snippets, although it's not quite what I was after. I'm looking for dialog basecode that I can modify and use as a template file.
Kevin
A: 

Make the template yourself, from the first dialog you made. This will avoid the problem of having to search for a template that does exactly what you want.

Dustman
+3  A: 

Here's an article on creating your own Project and Project Item templates:

Create Reusable Project And Item Templates For Your Development Team

Much cooler, but not exactly what you asked for is T4 (text template transformation toolkit) that allow you to do intelligent code generation during builds. Take a look at this MSDN article for more info:

Generating Artifacts By Using Text Templates

Mike