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

Chapter 5 User Interface Essentials

public App(AppShell appShell)

{

InitializeComponent();

MainPage = appShell;

}

All of the above changes allow you to use AppShell just like any other page and not have to create an instance manually.

Tabs

It is worth noting that Shell offers you more functionality than you really need in building this application.

Shell allows you to design tab bars into your application. You can have bottom, top, or both to give flexibility on how you lay out your content. You have control over the styling and navigation within each of the tabs also.

I won’t be covering tabs but I thoroughly recommend checking out the documentation provided by Microsoft at https://learn.microsoft.com/ dotnet/maui/fundamentals/shell/tabs.

Search

Search is another useful feature that comes as part of Shell but again it is not something that you need in this application. Shell allows you to create your own SearchHandler, which means you can define how the results are met with the values entered in the search box that is automatically provided. You can even define the layout of the search results and the behavior for when an item in the search results is selected.

I won’t be covering search but I thoroughly recommend checking out the documentation provided by Microsoft at https://learn.microsoft. com/dotnet/maui/fundamentals/shell/search.

160