Merge pull request #419 from irihitech/loading
Introducing background and foreground for LoadingContainer
This commit is contained in:
@@ -14,10 +14,10 @@ public class Loading: ContentControl
|
||||
set => SetValue(IndicatorProperty, value);
|
||||
}
|
||||
|
||||
public static readonly StyledProperty<object?> IsLoadingProperty = AvaloniaProperty.Register<Loading, object?>(
|
||||
public static readonly StyledProperty<bool> IsLoadingProperty = AvaloniaProperty.Register<Loading, bool>(
|
||||
nameof(IsLoading));
|
||||
|
||||
public object? IsLoading
|
||||
public bool IsLoading
|
||||
{
|
||||
get => GetValue(IsLoadingProperty);
|
||||
set => SetValue(IsLoadingProperty, value);
|
||||
|
||||
@@ -2,6 +2,7 @@ using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Controls.Metadata;
|
||||
using Avalonia.Controls.Templates;
|
||||
using Avalonia.Media;
|
||||
|
||||
namespace Ursa.Controls;
|
||||
|
||||
@@ -28,6 +29,15 @@ public class LoadingContainer: ContentControl
|
||||
set => SetValue(LoadingMessageProperty, value);
|
||||
}
|
||||
|
||||
public static readonly StyledProperty<IBrush?> MessageForegroundProperty = AvaloniaProperty.Register<LoadingContainer, IBrush?>(
|
||||
nameof(MessageForeground));
|
||||
|
||||
public IBrush? MessageForeground
|
||||
{
|
||||
get => GetValue(MessageForegroundProperty);
|
||||
set => SetValue(MessageForegroundProperty, value);
|
||||
}
|
||||
|
||||
public static readonly StyledProperty<IDataTemplate> LoadingMessageTemplateProperty = AvaloniaProperty.Register<LoadingContainer, IDataTemplate>(
|
||||
nameof(LoadingMessageTemplate));
|
||||
|
||||
|
||||
@@ -1,8 +1,16 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace Ursa.Controls;
|
||||
|
||||
public class LoadingIcon: ContentControl
|
||||
{
|
||||
|
||||
public static readonly StyledProperty<bool> IsLoadingProperty = AvaloniaProperty.Register<LoadingIcon, bool>(
|
||||
nameof(IsLoading));
|
||||
|
||||
public bool IsLoading
|
||||
{
|
||||
get => GetValue(IsLoadingProperty);
|
||||
set => SetValue(IsLoadingProperty, value);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user