Skip to content

Instantly share code, notes, and snippets.

@jfversluis
Created December 16, 2019 14:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jfversluis/bd590a8054163f8389042c5ee39990fa to your computer and use it in GitHub Desktop.
Save jfversluis/bd590a8054163f8389042c5ee39990fa to your computer and use it in GitHub Desktop.
SwipeView in Action
<?xml version="1.0" encoding="UTF-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="SwipeViewSample.MainPage">
<StackLayout HorizontalOptions="Center" VerticalOptions="CenterAndExpand">
<SwipeView>
<SwipeView.LeftItems>
<SwipeItems>
<SwipeItem Text="Favorite"
IconImageSource="favorite.png"
BackgroundColor="LightGreen"
Invoked="Favorite_Invoked" />
</SwipeItems>
</SwipeView.LeftItems>
<SwipeView.RightItems>
<SwipeItems Mode="Execute">
<SwipeItem Text="Delete"
IconImageSource="delete.png"
BackgroundColor="LightPink"
Invoked="Delete_Invoked" />
</SwipeItems>
</SwipeView.RightItems>
<!-- Content -->
<Grid HeightRequest="60" WidthRequest="300" BackgroundColor="LightGray">
<Label Text="Welcome to Xamarin.Forms!" HorizontalOptions="Center" VerticalOptions="Center" />
</Grid>
</SwipeView>
</StackLayout>
</ContentPage>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment