첨부 소스 코드는 나눔고딕코딩 폰트를 사용합니다.
728x90
반응형
728x170

TestProject.zip
0.15MB

▶ App.xaml

<?xml version = "1.0" encoding = "UTF-8" ?>
<Application x:Class="TestProject.App"
    xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
    <Application.Resources>
        <ControlTemplate x:Key="TealControlTemplateKey">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="0.1*" />
                    <RowDefinition Height="0.8*" />
                    <RowDefinition Height="0.1*" />
                </Grid.RowDefinitions>
                <BoxView Color="Teal" />
                <Label
                    VerticalOptions="Center"
                    Margin="20,0,0,0"
                    FontSize="24"
                    TextColor="White"
                    Text="{TemplateBinding Title}" />
                <ContentPresenter Grid.Row="1" />
                <BoxView Grid.Row="2"
                    Color="Teal" />
                <Label Grid.Row="2"
                    HorizontalOptions="Start"
                    VerticalOptions="Center"
                    Margin="20,0,0,0"
                    TextColor="White"
                    Text="테마 변경" />
                <Label Grid.Row="2"
                    VerticalOptions="Center"
                    HorizontalOptions="End"
                    Margin="0,0,20,0"
                    TextColor="White"
                    Text="도움말" />
            </Grid>
        </ControlTemplate>
    </Application.Resources>
</Application>

 

728x90

 

▶ MainPage.xaml

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage x:Class="TestProject.MainPage"
    xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
    ControlTemplate="{StaticResource TealControlTemplateKey}"
    Title="테스트 앱">
    <StackLayout
        HorizontalOptions="Center"
        VerticalOptions="Center"
        Spacing="10">
        <Entry
            HorizontalOptions="Center"
            Placeholder="사용자명을 입력해 주시기 바랍니다." />
        <Entry
            HorizontalOptions="Center"
            Placeholder="패스워드를 입력해 주시기 바랍니다."
            IsPassword="True" />
        <Button
            HorizontalOptions="Center"
            Text="로그인" />
    </StackLayout>
</ContentPage>
728x90
반응형
그리드형(광고전용)
Posted by icodebroker

댓글을 달아 주세요