-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAppShell.xaml.cs
More file actions
36 lines (32 loc) · 1.29 KB
/
Copy pathAppShell.xaml.cs
File metadata and controls
36 lines (32 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using STFREYA.View;
namespace STFREYA
{
public partial class AppShell : Shell
{
public AppShell()
{
InitializeComponent();
Routing.RegisterRoute("ProfilePage", typeof(StudentProfileView));
this.Navigated += OnNavigated;
}
private async void OnNavigated(object sender, ShellNavigatedEventArgs e)
{
var currentPage = this.CurrentPage;
if (currentPage != null)
{
// Start the page off-screen below the view and fully transparent
currentPage.TranslationY = 800;
currentPage.Opacity = 0;
// Animate the page to slide up with a gentle bounce and fade in simultaneously
await Task.WhenAll(
currentPage.TranslateTo(0, 0, 600, Easing.CubicOut), // Slide-up with deceleration over 600ms
currentPage.FadeTo(1, 600) // Fade-in over 600ms
);
// Add a subtle bounce effect after the initial slide-up
await currentPage.TranslateTo(0, -10, 100, Easing.CubicOut); // Small bounce up
await currentPage.TranslateTo(0, 0, 100, Easing.CubicIn); // Settle back down
}
}
}
}