High-speed MVC Development in Visual Studio with CodeRush and DevExpress MVC Extensions

If you saw our Using CodeRush with MVC webinar, Rory and I introduced new templates that make it easy to exploit the MVC Extensions from DevExpress. These templates will likely be integrated into CodeRush 11.1, however you can install and start using them right now (installation instructions appear below).

Templates

Controls

Template        Control                     
xb Button
xc Calendar
xcb ComboBox
xde DateEdit
xgv GridView
xhe HtmlEditor
xhl HyperLink
xi Image
xl Label
xlb ListBox
xm Menu
xmo Memo
xnb NavBar
xp PopupControl
xpg PageControl
xrb RadioButton
xrbl RadioButtonList
xrp RoundPanel
xs Splitter
xse SpinEdit
xtb TextBox
xte TimeEdit
xtv TreeView
xu UploadControl

Items, Nodes, Groups, Panes, and Tab Pages

These templates make it easier to create elements inside the MVC controls. Copy the reference that will own these elements (e.g., “settings”, “settings.Properties”,  “firstMenu”,  etc.) to the clipboard before expanding.

Template    Calls Use Inside              
ga Groups.Add() NavBar
ia Items.Add() ComboBox, ListBox, Menu, RadioButtonList
na Nodes.Add() TreeView
pa Panes.Add() Splitter
tpa TabPages.Add()    PageControl

Other Templates

Template    Expansion
xrs RenderScripts
xrss RenderStyleSheets

Installation

To install, follow these steps:

1. Right-click and save each of the templates below.

HTML_MVC_DevEx Extensions.xml
CSharp_ASP.NET_MVC_DevEx Extensions.xml

IMPORTANT:  For VB developers, we have two sets of templates to choose from.

2. Start Visual Studio if it’s not running already.

3. From the DevExpress menu, select Options.

4. Navigate to the Editor\Templates options page.

5. IMPORTANT: Change the Language combo box at the bottom of the Options dialog to HTML.

LanguageHtml

6. Right-click the template TreeView and choose Import Templates….

7. Select the HTML_MVC_DevEx Extensions xml file downloaded in step one, and click Open.

8. If you see a Category Exists warning message, click OK.

CategoryExists

Next, we need to install the templates for adding items, groups, nodes, panes, and tab pages. These templates must be imported into the appropriate language group of templates.

 

If You Work in Visual Basic…

1. IMPORTANT: Change the Language combo box at the bottom of the Options dialog to Basic.

LanguageBasic

2. Right-click the template TreeView and choose Import Templates….

3. Select the Basic_ASP.NET_MVC_DevEx Extensions xml file downloaded in step one, and click Open.

4. If you see a Category Exists warning message, click OK.

 

If You Work in C#…

1. IMPORTANT: Change the Language combo box at the bottom of the Options dialog to CSharp.

LanguageCSharp

2. Right-click the template TreeView and choose Import Templates….

3. Select the CSharp_ASP.NET_MVC_DevEx Extensions xml file downloaded in step one, and click Open.

4. If you see a Category Exists warning message, click OK.

 

Testing

After importing the MVC Extension templates as shown above, click OK to close the Options dialog. Inside an MVC application, open an aspx file, go to an empty line, and expand one or more of the templates on this page.

MVC TreeView expansion

Free DevExpress Products - Get Your Copy Today

The following free DevExpress product offers remain available. Should you have any questions about the free offers below, please submit a ticket via the DevExpress Support Center at your convenience. We'll be happy to follow-up.
No Comments

Please login or register to post comments.