Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
AppsPage.xaml.cs
1using System.ComponentModel;
2
4{
8 public partial class AppsPage
9 {
14 public AppsPage(AppsViewModel ViewModel)
15 {
16 this.InitializeComponent();
17 this.ContentPageModel = ViewModel;
18
19 if (this.BindingContext is AppsViewModel Model)
20 Model.PropertyChanged += this.Vm_PropertyChanged;
21 }
22
23 private async void Vm_PropertyChanged(object? sender, PropertyChangedEventArgs e)
24 {
25 if (e.PropertyName == nameof(AppsViewModel.ShowingComingSoonPopup))
26 {
27 if (this.BindingContext is AppsViewModel Vm)
28 {
29 this.ComingSoonPopup.CancelAnimations();
30 this.MainContent.CancelAnimations();
31
32 if (Vm.ShowingComingSoonPopup)
33 {
34 this.ComingSoonPopup.Opacity = 0;
35 this.ComingSoonPopup.Scale = 0.8;
36 this.ComingSoonPopup.IsVisible = true;
37
38 this.MainContent.Opacity = 1;
39
40 _ = this.ComingSoonPopup.FadeToAsync(1, 500, Easing.CubicIn);
41 _ = this.ComingSoonPopup.ScaleToAsync(1, 500, Easing.CubicIn);
42
43 await this.MainContent.FadeToAsync(0.6, 500, Easing.CubicOut);
44 }
45 else
46 {
47 this.MainContent.Opacity = 0.6;
48
49 this.ComingSoonPopup.Opacity = 1;
50 this.ComingSoonPopup.Scale = 1;
51 this.ComingSoonPopup.IsVisible = true;
52
53 _ = this.MainContent.FadeToAsync(1, 500, Easing.CubicIn);
54
55 _ = this.ComingSoonPopup.FadeToAsync(0, 500, Easing.CubicOut);
56 await this.ComingSoonPopup.ScaleToAsync(0.8, 500, Easing.CubicOut);
57
58 this.ComingSoonPopup.IsVisible = false;
59 }
60 }
61 }
62 else if (e.PropertyName == nameof(AppsViewModel.BetaFeaturePressed))
63 {
64 if (this.BindingContext is AppsViewModel Vm)
65 {
66 this.BetaText.CancelAnimations();
67
68 if (Vm.BetaFeaturePressed)
69 {
70 this.BetaText.Scale = 1;
71
72 await this.BetaText.ScaleToAsync(1.05, 100, Easing.CubicOut);
73 }
74 else
75 {
76 this.BetaText.Scale = 1.05;
77
78 await this.BetaText.ScaleToAsync(1, 100, Easing.CubicIn);
79 }
80 }
81 }
82 }
83 }
84}
AppsPage(AppsViewModel ViewModel)
Creates a new instance of the AppsPage class.
Definition: ImplTypes.g.cs:58