[C#/MAUI/.NET6] ShellContent 엘리먼트 : Content 속성에서 ContentPage 객체를 앱 시작시 생성하기
C#/MAUI 2022. 5. 3. 11:49728x90
반응형
728x170
▶ AppShell.xaml
<?xml version="1.0" encoding="utf-8" ?>
<Shell x:Class="TestProject.AppShell"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:TestProject">
<TabBar>
<ShellContent
Icon="sample1.png"
Title="고양이">
<local:CatPage />
</ShellContent>
<ShellContent
Icon="sample2.png"
Title="개">
<local:DogPage />
</ShellContent>
<ShellContent
Icon="sample3.png"
Title="원숭이">
<local:MonkeyPage />
</ShellContent>
</TabBar>
</Shell>
※ CatPage, DogPage 및 MonkeyPage는 탐색에 대한 응답으로 온디맨드가 아니라 앱 시작 시 모두 생성된다.
728x90
반응형
그리드형(광고전용)
댓글을 달아 주세요