KeiStory

.NET MAUI Circle Image 표시하기

 

1. Border 의 StrokeShape 이용

이전 포스팅에서 사용법 참고 :

2024.05.06 - [코딩/.NET MAUI] - .NET MAUI PancakeView

<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>

결과

 

2. Frame 을 이용

<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>

결과

반응형

공유하기

facebook twitter kakaoTalk kakaostory naver band