Home > Articles > Programming > Windows Programming

  • Print
  • + Share This
From the author of

Creating a Custom User Interface for the Template

It's helpful to create a custom user interface for your project template. For example, the C# Indexer Wizard in Figure 3 uses a custom interface to allow you to provide additional information before the template generates the code. We could do the same kind of thing to allow the user to select the AttributeTargets enumerated values before generating the custom attribute class.

Figure 3Figure 3 The user interface for the Indexer Wizard template is implemented as an HTML file and rendered as a Windows form.

Interestingly, the interface is stored as an HTML file in C:\Program Files\Microsoft Visual Studio .NET\VC#\VC#Wizards\CSharpIndexerWiz\HTML\1033\default.htm. Something in the wizard engine converts this HTML file into a Windows form. (I haven't discovered the origin of the code that converts the HTML web page into a Windows form, but this would be a nice utility.)

Creating a custom user interface is a bit outside the scope of this article, so I'll leave that as an exercise for the reader, while we move on to creating the launch file for the wizard.

  • + Share This
  • 🔖 Save To Your Account