Skip to content

Instantly share code, notes, and snippets.

@juucustodio
Created January 26, 2018 21:27
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 juucustodio/ab75435ae82520d6fa78a5e5b39b5af0 to your computer and use it in GitHub Desktop.
Save juucustodio/ab75435ae82520d6fa78a5e5b39b5af0 to your computer and use it in GitHub Desktop.
Example of Sliding Panel in Xamarin.Forms applications - http://julianocustodio.com/sliding-panel
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:DemoSlidingPanel"
x:Class="DemoSlidingPanel.MainPage">
<AbsoluteLayout VerticalOptions="FillAndExpand" x:Name="Page">
<StackLayout AbsoluteLayout.LayoutBounds="0,0,1,1" AbsoluteLayout.LayoutFlags="All" BackgroundColor="White">
<Image Source="LeftBlue.png" HorizontalOptions="EndAndExpand" VerticalOptions="CenterAndExpand" >
<Image.GestureRecognizers>
<TapGestureRecognizer Tapped="LeftBlue_Tapped"/>
<PanGestureRecognizer PanUpdated="LeftBlue_Tapped" />
</Image.GestureRecognizers>
</Image>
</StackLayout>
<StackLayout x:Name="PageRight" AbsoluteLayout.LayoutBounds="0,0,1,1" AbsoluteLayout.LayoutFlags="All"
Orientation="Vertical" VerticalOptions="FillAndExpand" Spacing="0">
<StackLayout VerticalOptions="FillAndExpand" BackgroundColor="#006df0">
<Image Source="RightWhite.png" HorizontalOptions="StartAndExpand" VerticalOptions="CenterAndExpand" >
<Image.GestureRecognizers>
<TapGestureRecognizer Tapped="RightWhite_Tapped"/>
<PanGestureRecognizer PanUpdated="RightWhite_Tapped" />
</Image.GestureRecognizers>
</Image>
</StackLayout>
</StackLayout>
</AbsoluteLayout>
</ContentPage>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment