diff --git a/MCTG/Views/ContainerBase.xaml b/MCTG/Views/ContainerBase.xaml index 651d6b1..0b82765 100644 --- a/MCTG/Views/ContainerBase.xaml +++ b/MCTG/Views/ContainerBase.xaml @@ -16,7 +16,8 @@ + HorizontalOptions="StartAndExpand" + IsNotConnected="{Binding IsNotConnected, Source={x:Reference root}}"> diff --git a/MCTG/Views/ContainerBase.xaml.cs b/MCTG/Views/ContainerBase.xaml.cs index 8086e3d..71943f7 100644 --- a/MCTG/Views/ContainerBase.xaml.cs +++ b/MCTG/Views/ContainerBase.xaml.cs @@ -7,7 +7,8 @@ public partial class ContainerBase : ContentView InitializeComponent(); } - public static readonly BindableProperty MyContentProperty = + // Bind MyContent + public static readonly BindableProperty MyContentProperty = BindableProperty.Create("MyContent", typeof(View), typeof(ContainerBase), new Grid()); public View MyContent @@ -16,6 +17,7 @@ public partial class ContainerBase : ContentView set => SetValue(MyContentProperty, value); } + // Bind MyFlyoutContent public static readonly BindableProperty MyFlyoutContentProperty = BindableProperty.Create("MyFlyoutContent", typeof(View), typeof(ContainerBase), new Grid()); @@ -24,4 +26,14 @@ public partial class ContainerBase : ContentView get => (View)GetValue(MyFlyoutContentProperty); set => SetValue(MyFlyoutContentProperty, value); } + + // Bind IsNotConnected + public static readonly BindableProperty IsNotConnectedProperty = + BindableProperty.Create("IsNotConnected", typeof(bool), typeof(Button), false); + + public bool IsNotConnected + { + get => (bool)GetValue(IsNotConnectedProperty); + set => SetValue(IsNotConnectedProperty, value); + } } diff --git a/MCTG/Views/ContainerFlyout.xaml b/MCTG/Views/ContainerFlyout.xaml index 2bfa4c0..199f195 100644 --- a/MCTG/Views/ContainerFlyout.xaml +++ b/MCTG/Views/ContainerFlyout.xaml @@ -14,9 +14,16 @@ WidthRequest="100" HeightRequest="100" CornerRadius="50" Margin="0, 30, 0, 10" BorderWidth="5" BorderColor="Black" - IsEnabled="False"/> + IsEnabled="{Binding IsNotConnected, Source={x:Reference fl}}"/>