using DataPersistence; using Model; namespace Views; public partial class ContainerFlyout : ContentView { public MasterManager Master => (Application.Current as App).Master; public User user => Master.User.CurrentConnected; public ContainerFlyout() { InitializeComponent(); BindingContext = this; } #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 IsNotConnected public static readonly BindableProperty IsConnectedProperty = BindableProperty.Create("IsConnected", typeof(bool), typeof(Button), true); public bool IsConnected { get => (bool)GetValue(IsConnectedProperty); set => SetValue(IsConnectedProperty, 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()); } }