Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
lawrence_shaun_introducing_net_maui_build_and_deploy_crosspl.pdf
Скачиваний:
36
Добавлен:
26.06.2023
Размер:
5.15 Mб
Скачать

Chapter 5 User Interface Essentials

{

public string Name { get; init; }

public BaseLayout Layout { get; init; }

}

Pages

This will house the pages in your application. I am distinguishing between a page and a view because they do behave differently in .NET MAUI. You can think of a page as a screen that you are seeing whereas a view is a smaller component. A page can contain multiple views.

Let’s go ahead and create the following files under the Pages folder. The following steps show how to add the new pages.

•\

Right-click the Pages folder.

•\

Select Add New Item.

•\

Select the .NET MAUI tab.

•\

Select .NET MAUI ContentPage (XAML).

•\

Click Add.

BoardDetailsPage

This is the page that lets you both create and edit your boards. For now, you will not touch the contents of this file. Note that you should see

BoardDetailsPage.xaml and BoardDetailsPage.xaml.cs files created. You also need to jump over to the MauiProgram.cs file and register this

page with the Services inside the CreateMauiApp method.

builder.Services.AddTransient<BoardDetailsPage>();

113