Skip to content

Instantly share code, notes, and snippets.

View Char0394's full-sized avatar

Charlin Agramonte Char0394

View GitHub Profile
<?xml version="1.0" encoding="utf-8" ?>
<local:BaseQuickTourPage
xmlns:local="clr-namespace:QuickTourXFSample.Views.QuickTourSteps"
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:Controls="clr-namespace:QuickTourXFSample.Controls"
x:Class="QuickTourXFSample.Views.QuickTourSteps.QuickTourStep2PopUp" >
<StackLayout>
<Controls:AnimatedView>
<Button Text="Add"
public partial class HomePage : FlyoutPage
{
public ICommand ShowQuickTourCommand { get; }
public HomePage()
{
InitializeComponent();
var quickTourLauncher = QuickTourBuilder<QuickTourStep1PopUp>
.Initialize()
public partial class QuickTourStep1PopUp : BaseQuickTourPage, IQuickTourLauncher
{
public QuickTourStep1PopUp(): base() => InitializeComponent();
public Task LaunchAsync() => PopupNavigation.Instance.PushAsync(this, false);
}
<?xml version="1.0" encoding="utf-8" ?>
<local:BaseQuickTourPage
xmlns:local="clr-namespace:QuickTourXFSample.Views.QuickTourSteps"
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:Controls="clr-namespace:QuickTourXFSample.Controls"
x:Class="QuickTourXFSample.Views.QuickTourSteps.QuickTourStep1PopUp" >
<Controls:AnimatedView VerticalOptions="CenterAndExpand">
<Frame Padding="20"
public class QuickTourBuilder<T>
where T : BaseQuickTourPage, IQuickTourLauncher, new()
{
public static QuickTourBuilder<T> Initialize()
=> new QuickTourBuilder<T>(new T());
public QuickTourBuilder<T> Next(BaseQuickTourPage page)
{
_pages.Last().NextPage = page;
public interface IQuickTourLauncher
{
Task LaunchAsync();
}
<?xml version="1.0" encoding="UTF-8" ?>
<FlyoutPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="QuickTourXFSample.Views.HomePage">
<FlyoutPage.Flyout>
<ContentPage Title="Menu"/>
</FlyoutPage.Flyout>
<FlyoutPage.Detail>
<NavigationPage>
<x:Arguments>
public class AnimatedView : ContentView
{
public AnimatedView()
{
Device.StartTimer(TimeSpan.FromSeconds(1.5), () =>
{
this.ScaleTo(0.95, 900, Easing.CubicInOut).ContinueWith((x) =>
{
this.ScaleTo(1, 900, Easing.CubicInOut);
});
public abstract partial class BaseQuickTourPage : PopupPage
{
public BaseQuickTourPage()
{
InitializeComponent();
NextCommand = new Command<BaseQuickTourPage>(async (page) => await Next(page));
SkipCommand = new Command(async () => await Skip());
}
public static readonly BindableProperty ActualStepProperty = BindableProperty.Create(nameof(ActualStep), typeof(int), typeof(BaseQuickTourPage));
<?xml version="1.0" encoding="utf-8" ?>
<rg:PopupPage
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="QuickTourXFSample.Views.QuickTourSteps.BaseQuickTourPage"
xmlns:rg="http://rotorgames.com"
BackgroundColor="#D6072F40"
HasSystemPadding="True"
CloseWhenBackgroundIsClicked="False">
<rg:PopupPage.ControlTemplate>