■ SwipeView 엘리먼트의 SwipeTransitionMode 첨부 속성을 사용해 스와이프 전환 모드를 설정하는 방법을 보여준다. (ANDROID)
▶ MainPage.xaml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
<?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" xmlns:android="clr-namespace:Microsoft.Maui.Controls.PlatformConfiguration.AndroidSpecific;assembly=Microsoft.Maui.Controls"> <SwipeView android:SwipeView.SwipeTransitionMode="Drag"> <SwipeView.LeftItems> <SwipeItems> <SwipeItem BackgroundColor="LightGreen" Text="즐겨찾기" Invoked="favoriteSwipeItem_Invoked"> <SwipeItem.IconImageSource> <FontImageSource FontFamily="ionicons" Size="48" Color="Red" Glyph="" /> </SwipeItem.IconImageSource> </SwipeItem> <SwipeItem BackgroundColor="LightPink" Text="삭제" Invoked="deleteSwipeItem_Invoked"> <SwipeItem.IconImageSource> <FontImageSource FontFamily="ionicons" Size="48" Color="Red" Glyph="" /> </SwipeItem.IconImageSource> </SwipeItem> </SwipeItems> </SwipeView.LeftItems> <Grid WidthRequest="300" HeightRequest="60" BackgroundColor="LightGray"> <Label HorizontalOptions="Center" VerticalOptions="Center" Text="오른쪽 밀기" /> </Grid> </SwipeView> </ContentPage> |