All Projects → AlexandrNikulin → Animationnavigationpage

AlexandrNikulin / Animationnavigationpage

Licence: apache-2.0
AnimationNavigationPage is a NavigationPage with custom transitions animation effects.

Projects that are alternatives of or similar to Animationnavigationpage

Denunciado
This project born from the need from people to have a way of communication between municipalities and communities. Some municipalities, have their platforms, but they are complex to validate the veracity of complaints. Denounced, it was born with the purpose of offering a free platform to these municipalities. Denounced consists of three main modules developed with Microsoft technologies, using the .Net Framework and Xamarin for its development: 1. Back End Web Project: Module of administration of the complaints, by the employees of the town councils. In this tool, the employees of the city council receive, validate, report and close the complaints, after being served. 2. Web Portal Client: It consists of a web project, so that the community make their complaints, in the same, the users of the service create a profile, must specify when making their complaint, evidence to support this. Through the portal, they can see the complaints of other community members, follow it, give their opinion or provide possible solutions or more evidence. 3. Mobile Project: It has the same functionalities as the web portal, with the addition, that the automatic location can be sent, from the cell phone.
Stars: ✭ 183 (-22.13%)
Mutual labels:  xamarin, xamarin-forms
Xamarin Forms Page Transitions
Custom page transitions in a Xamarin.Forms App
Stars: ✭ 200 (-14.89%)
Mutual labels:  xamarin, xamarin-forms
Expandableview
Expandable view for Xamarin.Forms
Stars: ✭ 178 (-24.26%)
Mutual labels:  xamarin, xamarin-forms
Xfx.controls
Xamarin Forms Extended Controls
Stars: ✭ 187 (-20.43%)
Mutual labels:  xamarin, xamarin-forms
Mobile
The mobile app vault (iOS and Android).
Stars: ✭ 3,149 (+1240%)
Mutual labels:  xamarin, xamarin-forms
Reactive Examples
Samples App using the Reactive Extensions and Reactive UI
Stars: ✭ 203 (-13.62%)
Mutual labels:  xamarin, xamarin-forms
Xamarin.forms.mocks
Library for running Xamarin.Forms inside of unit tests
Stars: ✭ 179 (-23.83%)
Mutual labels:  xamarin, xamarin-forms
Xamarines
🕹️📱Cross-Platform Nintendo Emulator using Xamarin and .Net Standard!
Stars: ✭ 153 (-34.89%)
Mutual labels:  xamarin, xamarin-forms
Xamarinformslayoutchallenges
Sample Layouts for Xamarin Forms
Stars: ✭ 230 (-2.13%)
Mutual labels:  xamarin, xamarin-forms
Caliburn.micro
A small, yet powerful framework, designed for building applications across all XAML platforms. Its strong support for MV* patterns will enable you to build your solution quickly, without the need to sacrifice code quality or testability.
Stars: ✭ 2,404 (+922.98%)
Mutual labels:  xamarin, xamarin-forms
Xamarin.forms.datagrid
DataGrid Component For Xamarin.Forms Projects
Stars: ✭ 226 (-3.83%)
Mutual labels:  xamarin, xamarin-forms
Thelittlethingsplayground
Playground for experimenting with new Xamarin.Forms features.
Stars: ✭ 195 (-17.02%)
Mutual labels:  xamarin, xamarin-forms
Microsoft.maui.graphics
Stars: ✭ 160 (-31.91%)
Mutual labels:  xamarin, xamarin-forms
Xamarin Playground
Random cool stuff I play around using Xamarin.. :3 Some of these cool projects I feature them on my blog, with step by step explanation. :) Don't forget to check it out. Go to: theconfuzedsourcecode.wordpress.com
Stars: ✭ 183 (-22.13%)
Mutual labels:  xamarin, xamarin-forms
Xamarin.plugin.calendar
Calendar plugin for Xamarin.Forms
Stars: ✭ 159 (-32.34%)
Mutual labels:  xamarin, xamarin-forms
Xamarin Forms Goodlooking Ui
Xamarin.Forms goodlooking UI samples
Stars: ✭ 2,300 (+878.72%)
Mutual labels:  xamarin, xamarin-forms
Simpleauth
The Simplest way to Authenticate and make Rest API calls in .Net
Stars: ✭ 148 (-37.02%)
Mutual labels:  xamarin, xamarin-forms
Graphicscontrols
Experimental GraphicsControls - Build drawn controls (Cupertino, Fluent and Material)
Stars: ✭ 149 (-36.6%)
Mutual labels:  xamarin, xamarin-forms
Improvexamarinbuildtimes
Tips and tricks on how to speed up the time it takes to compile a Xamarin app
Stars: ✭ 180 (-23.4%)
Mutual labels:  xamarin, xamarin-forms
Xamarin Demos
This repository contains the Syncfusion Xamarin UI control’s samples and the guide to use them.
Stars: ✭ 218 (-7.23%)
Mutual labels:  xamarin, xamarin-forms

Updates: Published NuGet Package.

Animation Navigation Page

Override the default Page Transitions for Xamarin.Forms when calling PushAsync and PopAsync.

Using the AnimationNavPage we can demonstrate how to create a custom transition between different pages.

Android iOS

Features

  • Set Animation Duration.
  • Select Animation type (Empty, Push, Fade, Flip, Slide, Roll, Rotate).
  • Select Animation Subtype (Default, FromLeft, FromRight, FromTop, FromBottom).

Links

Support platforms

  • [x] Android
  • [x] iOS

Usage

Setting-up and using the component happens in 3 steps:

  1. Install nuget package for PCL/Net.Standard, IOS and Android projects
  2. Declare AnimationNavigationPage
  3. Create and Animation page

INSTALL

Download the package from https://www.nuget.org/packages/XForms.Plugin.AnimationNavigationPage.

Next, add 'FormsControls.Touch.Main.Init()' into AppDelegate.cs of your Xamarin.iOS Project:

public partial class AppDelegate : Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
{
    public override bool FinishedLaunching(UIApplication app, NSDictionary options)
    {
        Xamarin.Forms.Forms.Init();
        FormsControls.Touch.Main.Init();
        LoadApplication(new App());
        return base.FinishedLaunching(app, options);
    }
}

Finaly, add 'FormsControls.Droid.Main.Init()' into MainActivity.cs of your Xamarin Droid Project:

public class MainActivity : Xamarin.Forms.Platform.Android.FormsAppCompatActivity
{
    protected override void OnCreate(Bundle bundle)
    {
        TabLayoutResource = Resource.Layout.Tabbar;
        ToolbarResource = Resource.Layout.Toolbar;
        base.OnCreate(bundle);
        Xamarin.Forms.Forms.Init(this, bundle);
        FormsControls.Droid.Main.Init(this);
        LoadApplication(new App());
    }
}

DECLARE ANIMATIONNAVIGATIONPAGE

In your App, declare your new main page as follows:

public class App : Application
{
        public App()
        {
            InitializeComponent();
            MainPage = new AnimationNavigationPage(new StartPage());
        }
}

CREATE AND ANIMATION PAGE

There are 3 ways to create an Animation Page:

  1. Implement the IAnimationPage interface
  2. Use XAML Tags - No Binding
  3. Use XAML Tags - With Binding

OPTION 1 - Implement the IAnimationPage interface

Firstly, add the interface declaration to your class definition as follows:

public partial class InterfaceImplementedPage : ContentPage, IAnimationPage 

Next, add the following code to the class:

public IPageAnimation PageAnimation { get; } = new FlipPageAnimation { Duration = AnimationDuration.Long, Subtype = AnimationSubtype.FromTop };

public void OnAnimationStarted(bool isPopAnimation)
{
	// Put your code here but leaving empty works just fine
}

public void OnAnimationFinished(bool isPopAnimation)
{
	// Put your code here but leaving empty works just fine
}

Note that depending on the type of transition you want, you can change FlipPageAnimation into SlidePageAnimation, FadePageAnimation… or whichever animation you require. Further configuration such as Duration and Subtype can be easily done.

OPTION 2 - Use XAML no Binding

Firstly, make sure that the code behind inherits from AnimationPage:

public partial class XamlNoBindingPage : AnimationPage

Next, use the 'controls:AnimationPage' tag instead of the 'ContentPage' tag as follows:

<controls:AnimationPage xmlns="http://xamarin.com/schemas/2014/forms" 
    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" 
    xmlns:controls="clr-namespace:FormsControls.Base;assembly=FormsControls.Base"
    x:Class="AnimatedTransitionNavPageDemo.Pages.XamlNoBindingPage" 
    Title="XAML No Binding">

Lastly, we must declare a tag in the page to specify which transition we would like to use:

<controls:AnimationPage.PageAnimation>
   <controls:RotatePageAnimation Duration="Medium" Subtype="FromLeft" />
</controls:AnimationPage.PageAnimation>

Notice that here we are declaring a RotatePageAnimation but again we can pick whatever Animation we want. Properties are also available to further customize the animation (duration, subtype…).

After this you are now able to configure your page as you would in a normal content page.

OPTION 3 - Use XAML with BINDING

The component allows you to bind the PageAnimation property. To do this declare the 'controls:AnimationPage' as follows:

<controls:AnimationPage xmlns="http://xamarin.com/schemas/2014/forms" 
    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" 
    xmlns:controls="clr-namespace:FormsControls.Base;assembly=FormsControls.Base"
    x:Class="AnimatedTransitionNavPageDemo.Pages.XamlWithBindingPage" 
    NavigationPage.BackButtonTitle="Back"
    Title="XAML With Binding"
    PageAnimation="{Binding MyPageAnimation}">

In this case Your ViewModel should then have a ‘MyPageAnimation’ property defined. We are using Fody so our simplified code looks like this:

public IPageAnimation MyPageAnimation { get; set; }

This property can then be set in the following way:

MyPageAnimation = new SlidePageAnimation()
  {
  	Duration = AnimationDuration.Long,
	Subtype = AnimationSubtype.FromTop
  };

Again, we can use different types of animations and further configure the properties.

So, there you have it. A simple example on how to set-up Custom Transitions using 3 different implementation techniques.

Enjoy and any question or improvements, please let me know.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].