# Scaffolding Pages and Screens for Visual Studio Code

The Telerik UI for .NET MAUI Visual Studio Code extension lets you scaffold an app page (screen) and increase your productivity. The scaffoldings allow you to quickly add predefined pages with controls to your application and define the parameters of the controls through an UI.

## Get the Extension

To use the Telerik UI for .NET MAUI Scaffoldings, install the `Telerik UI for .NET MAUI Productivity Tools` extension for Visual Studio Code. You can get the extension from:

* <a href="https://marketplace.visualstudio.com/items?itemName=TelerikInc.telerik-maui-productivity-tools" target="_blank">Telerik UI for .NET MAUI Productivity Tools in the Visual Studio Code Marketplace</a>

* The **Extensions** tab in Visual Studio Code—search for `Telerik UI for .NET MAUI Productivity Tools`, select the extension, and then click **Install**.

## Add The Scaffolding Page to Your App

To add the desired screen to your MAUI application:

1. Open the project in Visual Studio Code.

2. Right-click the name of the `.csproj` file.

3. From the popup menu, select **New Telerik UI for .NET MAUI Project Item Generator**.

   ![.NET MAUI Scaffolding dialog](https://www.telerik.com/maui-ui/documentation/assets/ad3d7741b16b44e0b189e178922fbae6/scaffolding-vscode-dialog.png)

4. From the UI form, select the desired page and set the available parameters.

   ![.NET MAUI Scaffolding dialog](https://www.telerik.com/maui-ui/documentation/assets/0dcf52cfe8ac6339600ad9f361155d42/scaffolding-vscode-options.png)

As a result, the VS code extension does the following:

* Adds the page to the `Pages` folder of the application. If the folder does not exist, it will be created.
* Adds a `ViewModel` for the created page to the `ViewModels` folder. If the folder does not exist, it will be created.

The next image shows the file structure created for the `DataGrid` page:
![.NET MAUI Scaffolding result](https://www.telerik.com/maui-ui/documentation/assets/80135bbfe34b6479e7b0afa7274ee632/scaffolding-vscode-result.png)

## Displaying a Scaffolded Screen in Your App

To show a newly scaffolded page in your MAUI app, specify the page's namespace.

### Using a Blank App Template

Set the screen directly to the `MainPage` of the application inside the `App.xaml.cs` file when using a Blank app template.

```C#
MainPage = new MyApp.Pages.TelerikDataGridPage();
```

### Using a Blank Shell App Template

Set the screen directly to the `ShellContent` inside the `AppShell.xaml` file when using a Blank Shell app.

```XAML
<Shell
    x:Class="TestScaffoldings.AppShell"
    xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
    xmlns:local="clr-namespace:TestScaffoldings"
    xmlns:pages="clr-namespace:MyApp.Pages"
    Shell.FlyoutBehavior="Disabled"
    Title="TestScaffoldings">

    <ShellContent
        Title="Home"
        ContentTemplate="{DataTemplate pages:TelerikCollectionViewPage}"
        Route="MainPage" />

</Shell>
```

This is the result on iOS and MacCatalyst:

![.NET MAUI Scaffolding screen look](https://www.telerik.com/maui-ui/documentation/assets/c747328af88d314d03b06200773ea839/scaffolding-vscode-screen-look.png)

## Available Scaffoldings

<TabStrip>
<TabStripTab title="CollectionView Page">

The CollectionView page represents a list of products. The main control used on this page is the Telerik UI for .NET MAUI [CollectionView](https://www.telerik.com/maui-ui/documentation/controls/collectionview/overview) control. The scaffolding page allows you to configure the selection mode of the CollectionView and whether to add the predefined icons used in the template.

The image shows the default appearance of the page:

![.NET MAUI Products Page](https://www.telerik.com/maui-ui/documentation/assets/52fd3a49de99c3bed466dd42307c050f/products_page.png)

</TabStripTab>
<TabStripTab title="DataGrid Page">

The DataGrid page represents a data displayed in a table. The main control used on this page is the Telerik UI for .NET MAUI [DataGrid](https://www.telerik.com/maui-ui/documentation/controls/datagrid/overview) control. The scaffolding page allows you to configure the data source used in the DataGrid, the selection mode, whether editing, sorting, filtering and grouping the data in the control will be enabled.

The image shows the default appearance of the page:

![.NET MAUI DataGrid Page](https://www.telerik.com/maui-ui/documentation/assets/f161664c25d575efb160d26c8db5c4a9/datagrid_page.png)

</TabStripTab>
<TabStripTab title="Login Page">

The Login screen represents a login panel. The main controls used on this screen are the Telerik UI for .NET MAUI [Entry](https://www.telerik.com/maui-ui/documentation/controls/entry/overview) and [TemplatedButton](https://www.telerik.com/maui-ui/documentation/controls/templatedbutton/overview) controls. The scaffolding page allows you to add a social login panel to this screen.

The image shows the default appearance of the page:

![.NET MAUI Login Page](https://www.telerik.com/maui-ui/documentation/assets/7499bb4e73066a7b4c3d500baa7a88a6/login_screen.png)

</TabStripTab>
<TabStripTab title="Register Screen">

The Register page allows you to add a register page to your .NET MAUI application. The main controls used on this screen are the Telerik UI for .NET MAUI [Entry](https://www.telerik.com/maui-ui/documentation/controls/entry/overview) and [TemplatedButton](https://www.telerik.com/maui-ui/documentation/controls/templatedbutton/overview) controls.

The image shows the default appearance of the page:

![.NET MAUI Register Screen](https://www.telerik.com/maui-ui/documentation/assets/6d54cc2aea8d778133423ea6ef7ced45/register_screen.png)

</TabStripTab>
<TabStripTab title="Reset Password Screen">

The Reset Password page allows you to add a reset password page to your application. The main controls used on this screen are the Telerik UI for .NET MAUI [Entry](https://www.telerik.com/maui-ui/documentation/controls/entry/overview) and [TemplatedButton](https://www.telerik.com/maui-ui/documentation/controls/templatedbutton/overview) controls.

The image shows the default appearance of the page:

![.NET MAUI Reset Password Screen](https://www.telerik.com/maui-ui/documentation/assets/63b81ffaccaaca0040dafe80c9334c85/reset_screen.png)

</TabStripTab>
</TabStrip>

## See Also

* [Create .NET MAUI Projects with Visual Studio Code](https://www.telerik.com/maui-ui/documentation/installation/vs-code-integration/new-project-wizard)
* [Use Telerik UI for .NET MAUI Code Snippets](https://www.telerik.com/maui-ui/documentation/installation/vs-code-integration/snippets)
* [Add Document Processing Libraries with Visual Studio Code](https://www.telerik.com/maui-ui/documentation/installation/vs-code-integration/new-document-processing-wizard)
