using DataPersistence; using Model; namespace Views; public partial class ContainerFlyout : ContentView { public MasterManager Master => (Application.Current as App).Master; public ContainerFlyout() { InitializeComponent(); BindingContext = Master.User; } #region Bindable XAML Properties // Bind MyFlyoutContent public static readonly BindableProperty MyFlyoutContentProperty = BindableProperty.Create("MyFlyoutContent", typeof(View), typeof(ContainerFlyout), new Grid()); public View MyFlyoutContent { get => (View)GetValue(MyFlyoutContentProperty); set => SetValue(MyFlyoutContentProperty, value); } // bind NeedReturn public static readonly BindableProperty NeedReturnProperty = BindableProperty.Create("NeedReturn", typeof(bool), typeof(Border), false); public bool NeedReturn { get => (bool)GetValue(NeedReturnProperty); set => SetValue(NeedReturnProperty, value); } #endregion public async void ProfileButton_Clicked(object sender, EventArgs e) { await Navigation.PushModalAsync(new MyProfil()); } public async void ConnectionButton_Clicked(object sender, EventArgs e) { await Navigation.PushModalAsync(new Login()); } public void Logout_Clicked(object sender, EventArgs e) { Master.User.LogOut(); } }