728x90
728x170

첫번째,

<Border
    Margin="5"
    StrokeThickness="1"
    HeightRequest="200"
    WidthRequest="200">
    <Border.StrokeShape>
        <RoundRectangle CornerRadius="100,100,100,100" />
    </Border.StrokeShape>
    <Image
        Source="dotnet_bot.png"
        HorizontalOptions="Center" 
        VerticalOptions="Center"
        Margin="15"
        Aspect="AspectFit"/>
</Border>

이전에 포스팅 한건데 Border.StrokeShape 이용하여 구현이 가능하다.
2022.08.17 - [C#/Xamarin Maui] - [.NET MAUI] PancakeView 따라하기

두번째,

<Frame 
    BackgroundColor="SkyBlue"
    BorderColor="Blue"
    VerticalOptions="Center"
    HorizontalOptions="Center"
    HeightRequest="200"
    WidthRequest="200"
    CornerRadius="100">
    <Image
        Source="dotnet_bot.png"
        HorizontalOptions="Center"
        VerticalOptions="Center"
        Margin="5"
        Aspect="AspectFit"/>
</Frame>

Frame  안에 이미지를 넣고  Frame 에 CornerRadius 를 주면 처리가 된다.

 

728x90
그리드형
Posted by kjun
,