Thursday, January 10, 2008

I often find myself at a customer site,  when I quickly need to mock up some .Net Compact Framework forms.   I'm sure you all know this, but I didn't realise until I looked that it is possible to save any Visual Studio (across all versions) item as a template.   By item, I mean  form, class, user control etc.

Here's the process.    I wanted to save a standard form out as a template.       First create your dream form, as follows -

image

From the File menu,   select Export Template...    

image

Select Item Template,   and pick the project which contains your form.   Then select Next.

 

image

Select the form you require to be saved as a template, then click Next.

The next screen prompts if you wish to reference any assemblies.   In this case, I don't so just click Next.

Almost there.   Next screen you give your template a name -

image

Click Finish, and you are good to go.

Now in Visual Studio,  when you select Add New Item To Project you will see your form,   as follows -

 

image

 

And that's it.   No more boring re-creation of commonly used items.

Thursday, January 10, 2008 9:03:04 AM UTC  #    Comments [0]  | 
Comments are closed.

Theme design by Jelle Druyts

Pick a theme: