Telerik blogs

In case you missed the announcement last week, check out Erjan's blog post  about our new product called RadControls for ASP.NET AJAX VS Extensions  (Click here  to download it). It works with both Visual Studio 2008 and Visual Studio 2005 and expands the capabilities of the IDE by allowing developers to create RadControls  Item templates.

RadControls for ASP.NET AJAX VS Extensions using T4 (Text Template Transformation Toolkit) to generate the code behind the scenes when an Item Template is added to a project. T4 is a fully customizable text generator based on templates. Anyone can create or edit such a template having complete control over the resulting code.

Scott Hanselman recommends using T4 for any repetitive text generation task: “If you're doing something twice or more, manually, in your company, generate it.”

 

To add an existing RadControls Item Template:

Right-click on the Project menu and choose the “Telerik->Add RadControls Template…” context menu item 

context

 

This will cause a Telerik Template wizard dialog to appear that allows you to create a new RadControls Item

Disalog

 

A template is basically containing:

  1. All the template files (.t4), resources, .designer files, etc required to recreate the item.
  2. A TemplateInfo.xml file containing the metadata that provides Visual Studio with the information it needs to display the template in the Telerik Template Wizard dialog boxes and create an Item from the template.

T4 can be used to automate the generation of text files of any type and purpose. If you're interested in finding out more about how T4 works, and to get some great samples, check out Oleg Sych’s blog.

 

Enjoy!
Plamen Peshev | The Telerik VSXTeam


Comments

Comments are disabled in preview mode.