title | page_title | description | slug | position | tags | previous_url |
---|---|---|---|---|---|---|
Scaffolding Pages and Screens |
Telerik UI for .NET MAUI Scaffoldings - Visual Studio Scaffoldings |
Learn how to add predefined screens in your application using via Telerik .NET MAUI Visual Studio Scaffoldings. |
maui-vs-scaffoldings |
10 |
maui, dotnet maui, item templates, scaffoldings, predefined pages, screens, visual studio |
/installation/windows/scaffoldings |
The Telerik UI for .NET MAUI Visual Studio 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.
To use the Telerik UI for .NET MAUI Scaffoldings, install the Progress Telerik UI for .NET MAUI Extension
for Visual Studio. You can get the extension from:
-
The Extensions tab in Visual Studio—search for
Progress Telerik UI for .NET MAUI Extension
, select the extension, and then click Install. -
The Telerik UI for .NET MAUI [MSI installer]({%slug automated-installer %}).
For more information, go to the [Productivity Extensions for Visual Studio]({% slug vs-integration-overview %}) topic.
To add the desired screen to your MAUI application:
-
Open the project in Visual Studio.
-
Right-click the name of the project.
-
From the popup menu select Telerik UI for .NET MAUI -> Add new Scaffolded Item.
-
From the UI form, select the desired page and set the available parameters.
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 theViewModels
folder. If the folder does not exist, it will be created.
The next image shows the file structure created for the DataGrid
page:
To show a newly scaffolded page in your MAUI app, specify the page's namespace.
Set the screen directly to the MainPage
of the application isndie the App.xaml.cs
file when using a Blank app template
MainPage = new MyApp.Pages.TelerikDataGridPage();
Set the screen directly to the ShellContent
inside the AppShell.xaml
file when using a Blank Shell app.
<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:TelerikDataGridPage}"
Route="MainPage" />
</Shell>
This is the result on Android and WinUI:
The Products page represents a list of products. The main control used on this page is the Telerik UI for .NET MAUI [CollectionView]({%slug 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:
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]({%slug 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:
The Login screen represents a login panel. The main controls used on this screen are the Telerik UI for .NET MAUI [Entry]({%slug entry-overview%}) and [TemplatedButton]({%slug 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:
This screen 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]({%slug entry-overview%}) and [TemplatedButton]({%slug templatedbutton-overview%}) controls.
The image shows the default appearance of the page:
This screen 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]({%slug entry-overview%}) and [TemplatedButton]({%slug templatedbutton-overview%}) controls.
The image shows the default appearance of the page:
- [UI for MAUI Installation Methods]({%slug installation-approaches%})
- [System Requirements for Windows]({% slug system-requirements %})
- [Productivity Extensions for Visual Studio]({% slug vs-integration-overview %})
- [Telerik UI for .NET MAUI Sample Apps]({% slug controls-samples-app %})