35 lines
1.4 KiB
C#
35 lines
1.4 KiB
C#
|
|
namespace MauiApp.Controls;
|
|
|
|
public partial class BusyContainer : ContentView
|
|
{
|
|
public static readonly Brush DefaultBusyBackground = new SolidColorBrush(Color.FromHex("ECEFF1"));
|
|
public const double DefaultBusyBackgroundOpacity = .5;
|
|
|
|
public static readonly BindableProperty IsLoadingVisibleProperty = BindableProperty.Create(nameof(IsLoadingVisible), typeof(bool), typeof(BusyContainer), default(bool));
|
|
public static readonly BindableProperty BusyBackgroundProperty = BindableProperty.Create(nameof(BusyBackground), typeof(Brush), typeof(BusyContainer), defaultValue: DefaultBusyBackground);
|
|
public static readonly BindableProperty BusyBackgroundOpacityProperty = BindableProperty.Create(nameof(BusyBackgroundOpacity), typeof(double), typeof(BusyContainer), defaultValue: DefaultBusyBackgroundOpacity);
|
|
|
|
public bool IsLoadingVisible
|
|
{
|
|
get => (bool)GetValue(IsLoadingVisibleProperty);
|
|
set => SetValue(IsLoadingVisibleProperty, value);
|
|
}
|
|
|
|
public Brush BusyBackground
|
|
{
|
|
get => (Brush)GetValue(BusyBackgroundProperty);
|
|
set => SetValue(BusyBackgroundProperty, value);
|
|
}
|
|
|
|
public double BusyBackgroundOpacity
|
|
{
|
|
get => (double)GetValue(BusyBackgroundOpacityProperty);
|
|
set => SetValue(BusyBackgroundOpacityProperty, value);
|
|
}
|
|
|
|
public BusyContainer()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
} |