728x90
반응형
728x170
■ RoundRectangleGeometry 엘리먼트를 사용하는 방법을 보여준다.
▶ 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">
<Path
HorizontalOptions="Center"
VerticalOptions="Center"
WidthRequest="300"
HeightRequest="300"
StrokeThickness="10"
Stroke="Black"
Fill="Orange"
BackgroundColor="Yellow"
Aspect="Fill">
<Path.Data>
<RoundRectangleGeometry
Rect="10,10,150,100"
CornerRadius="5" />
</Path.Data>
</Path>
</ContentPage>
※ 프리뷰 버전 테스트시, Path 엘리먼트가 설정된 크기대로 표시되지 않고 화면 전체를 채운 상태로 표시되었다. 디버깅 모드에서 Path 엘리먼트의 WidthRequest/HeightRequest 속성을 반복적으로 변경하면 표시가 정상적으로 되었다.
728x90
반응형
그리드형(광고전용)
댓글을 달아 주세요