You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
SAE-2.01/MCTG/Views/ContentViews/ContainerFlyout.xaml.cs

61 lines
1.6 KiB

using DataPersistence;
using Model;
namespace Views;
public partial class ContainerFlyout : ContentView
{
public MasterManager Master => (Application.Current as App).Master;
public User ConnectedUser => 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());
}
}