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).
In the invoked Insert DevExpress Extension dialog, select and customize the required extension, and click Insert.
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.
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.
See the following video to learn how to use the Insert Extension Wizard: