Skip to main content
A newer version of this page is available. .

Insert MVC Extension Wizard

  • 2 minutes to read

The Insert Extension Wizard allows you to add fully functional MVC extensions to projects, with minimal coding.

To invoke the wizard in Visual Studio, select DEVEXPRESS | ASP.NET Controls v19.2 | Insert DevExpress MVC Extension…, or right-click the design area of a view and select Insert DevExpress MVC Extension (as shown below).

ExtensionWizard_menu

In the invoked Insert DevExpress Extension dialog, select and customize the required extension, and click Insert.

ExtensionWizard

The wizard automatically generates the extension’s View code and inserts it into the View at the cursor position.

@Html.DevExpress().NavBar(settings => {
     settings.Name = "MyNavBar";

     settings.Groups.Add(group => {
          group.Text = "Group 0";
          group.Items.Add("Item 0");
          group.Items.Add("Item 1");
          group.Items.Add("Item 2");
     });
     settings.Groups.Add(group => {
          group.Text = "Group 1";
          group.Items.Add("Item 0");
     });
}).GetHtml()

If the selected MVC Extension functions via callbacks, the wizard can add all the necessary actions and helpers to the Controller, and Partial Views to the project. To see all changes made by the Insert Extension Wizard, click the Show output form: pull-down menu and select DevExpress extension integrator.

MVC_Wizard_SelectOutput

The selected output entries describe changes made to your project. You can double-click an entry, and Visual Studio will open the corresponding file and focus on the position where the new code was inserted.

MVC_Wizard_OutputWindow

See the following video to learn how to use the Insert Extension Wizard: