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

TestProject.zip
0.15MB

▶ 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">
    <ScrollView
        Margin="10"
        Orientation="Vertical">
        <StackLayout Spacing="10">
            <Label
                HorizontalOptions="Start"
                Text="AlignContent 속성 : Start" />
            <Frame
                Margin="0,10,0,0"
                HeightRequest="200"
                CornerRadius="0"
                BorderColor="Black"
                Padding="2,2,2,2">
                <FlexLayout
                    Direction="Column"
                    Wrap="Wrap"
                    AlignContent="Start">
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Red"     />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Green"   />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Blue"    />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Magenta" />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Red"     />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Green"   />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Blue"    />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Magenta" />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Red"     />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Green"   />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Blue"    />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Magenta" />
                </FlexLayout>
            </Frame>
            <Label
                HorizontalOptions="Start"
                Margin="0,10,0,0"
                Text="AlignContent 속성 : Center" />
            <Frame
                Margin="0,10,0,0"
                HeightRequest="200"
                CornerRadius="0"
                BorderColor="Black"
                Padding="2,2,2,2">
                <FlexLayout
                    Direction="Column"
                    Wrap="Wrap"
                    AlignContent="Center">
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Red"     />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Green"   />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Blue"    />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Magenta" />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Red"     />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Green"   />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Blue"    />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Magenta" />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Red"     />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Green"   />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Blue"    />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Magenta" />
                </FlexLayout>
            </Frame>
            <Label
                HorizontalOptions="Start"
                Margin="0,10,0,0"
                Text="AlignContent 속성 : End" />
            <Frame
                Margin="0,10,0,0"
                HeightRequest="200"
                CornerRadius="0"
                BorderColor="Black"
                Padding="2,2,2,2">
                <FlexLayout
                    Direction="Column"
                    Wrap="Wrap"
                    AlignContent="End">
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Red"     />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Green"   />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Blue"    />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Magenta" />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Red"     />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Green"   />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Blue"    />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Magenta" />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Red"     />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Green"   />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Blue"    />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Magenta" />
                </FlexLayout>
            </Frame>
            <Label
                HorizontalOptions="Start"
                Margin="0,10,0,0"
                Text="AlignContent 속성 : SpaceAround" />
            <Frame
                Margin="0,10,0,0"
                HeightRequest="200"
                CornerRadius="0"
                BorderColor="Black"
                Padding="2,2,2,2">
                <FlexLayout
                    Direction="Column"
                    Wrap="Wrap"
                    AlignContent="SpaceAround">
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Red"     />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Green"   />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Blue"    />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Magenta" />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Red"     />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Green"   />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Blue"    />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Magenta" />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Red"     />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Green"   />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Blue"    />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Magenta" />
                </FlexLayout>
            </Frame>
            <Label
                HorizontalOptions="Start"
                Margin="0,10,0,0"
                Text="AlignContent 속성 : SpaceBetween" />
            <Frame
                Margin="0,10,0,0"
                HeightRequest="200"
                CornerRadius="0"
                BorderColor="Black"
                Padding="2,2,2,2">
                <FlexLayout
                    Direction="Column"
                    Wrap="Wrap"
                    AlignContent="SpaceBetween">
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Red"     />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Green"   />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Blue"    />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Magenta" />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Red"     />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Green"   />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Blue"    />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Magenta" />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Red"     />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Green"   />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Blue"    />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Magenta" />
                </FlexLayout>
            </Frame>
            <Label
                HorizontalOptions="Start"
                Margin="0,10,0,0"
                Text="JustifyContent 속성 : SpaceEvenly" />
            <Frame
                Margin="0,10,0,0"
                HeightRequest="200"
                CornerRadius="0"
                BorderColor="Black"
                Padding="2,2,2,2">
                <FlexLayout
                    Direction="Column"
                    Wrap="Wrap"
                    AlignContent="SpaceEvenly">
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Red"     />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Green"   />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Blue"    />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Magenta" />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Red"     />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Green"   />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Blue"    />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Magenta" />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Red"     />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Green"   />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Blue"    />
                    <BoxView Margin="1" WidthRequest="20" HeightRequest="20" Color="Magenta" />
                </FlexLayout>
            </Frame>
        </StackLayout>
    </ScrollView>
</ContentPage>
728x90
반응형
그리드형(광고전용)
Posted by icodebroker

댓글을 달아 주세요