-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Replace application main page with animation #2957
Comments
Can you expand on what kind of animation you're wanting? Would the new MainPage animate onto the existing one? Would it reveal itself atop a blank background (changing opacity from 0 to 1)? Etc. I'd also question the need for switching main pages. Whatever you're trying to do can possibly be done with modal pages (e.g. use login page modally without animation while the TabbedPage is the MainPage). |
i have 2 application cycles the two cycles need navigation bar so i can't use push modal without doing some extra code to handle navigation i have 2 cases
i used SizeChanged or LayoutChanged events because its occurs after Appearing event the marks shows when i replaced main page |
i just want to replace main page with any kind of animation to make the app have a good look in the case i want to replace it |
this video is for same app but with 1000 milliseconds animation |
I agree that this feature would be very useful because it is common in apps to separate login flow from normal application flow. |
var oldPage = new ContentPage();
var navPage = new NavigationPage(oldPage);
...
await navPage.PushAsync(new ContentPage()); //push new page
navPage.RemovePage(oldPage); //remove old from navigation stack |
@Mikilll94 I use a |
@programmation This approach becomes problematic if your app does not have a homepage (i.e. user after launching an app can see many different views) |
@Mikilll94 why don't you want to use NavigationPage ? |
Because I want to have two separate navigation stacks: one for login flow and second for normal flow. |
@Mikilll94 It's not perfect, but when I've needed to do this, I've used a |
in my case my first page is navigation page that have 5 pages until login |
@Mikilll94 I solve that issue by making each of the potential startup views have the same |
Really looking for this as well! |
@samhouts has anyone looked at this -> https://forums.xamarin.com/discussion/90474/potential-proposal-animation-of-mainpage-transition |
Hello, Navigation.InsertPageBefore(new Page(), this); //Insert page ontop of current Main Page |
Duplicate of #6033 |
Description
i know that we can change main page using this
App.Current.MainPage
but is it possible to change main page with some animation
The text was updated successfully, but these errors were encountered: