Today I needed to quickly do some screen mock ups for a customer. Rather than lay out yet another mobile form with labels down the left (right aligned and prettied up) and text labels on the left (left aligned and prettied up), I thought I would create myself some templates.
I’ve now got a set of all the most common ones I need -
Its really easy to-do and saves you a pile of time.
Here’s an example of my base form -
All you need todo in Visual Studio from the File menu is select Export Template, then follow the wizard through.
You can then tidy up the resultant templates by looking in
%userprofile%\Documents\Visual Studio 2008\My Exported Templates
A nice little tip, I found is that when you create a new instance of your template if you put the string
$safeitemname$
In the template file, it will substitute your class name in where you need it, great for setting window titles etc.
Finally zip up the contents of your template and copy to
%userprofile%\Documents\Visual Studio 2008\Templates\ItemTemplates\Visual C#
You can of course do the same for VB.net etc.
My only final tip, is to make sure you get your object (form etc.) right before you export it, its a pain to edit templates. Not impossible just a flaff.