diff --git a/demo/Ursa.Demo/Pages/LoadingDemo.axaml b/demo/Ursa.Demo/Pages/LoadingDemo.axaml
index f291038..00c0fb9 100644
--- a/demo/Ursa.Demo/Pages/LoadingDemo.axaml
+++ b/demo/Ursa.Demo/Pages/LoadingDemo.axaml
@@ -10,16 +10,16 @@
mc:Ignorable="d">
-
-
+
+
+
+
+
-
-
-
+ IsLoading="{Binding #s.IsChecked}"
+ LoadingMessage="Loading...">
+
+
diff --git a/src/Ursa.Themes.Semi/Controls/Loading.axaml b/src/Ursa.Themes.Semi/Controls/Loading.axaml
index 442c54b..8cdf7f6 100644
--- a/src/Ursa.Themes.Semi/Controls/Loading.axaml
+++ b/src/Ursa.Themes.Semi/Controls/Loading.axaml
@@ -6,10 +6,11 @@
-
+
-
+
+
@@ -42,12 +44,20 @@
+
+
-
-
-
+
@@ -69,10 +79,42 @@
Name="PART_ContentPresenter"
Grid.Row="1"
Content="{TemplateBinding Content}"
- ContentTemplate="{TemplateBinding ContentTemplate}" />
+ ContentTemplate="{TemplateBinding ContentTemplate}"
+ IsVisible="{TemplateBinding Content,
+ Converter={x:Static ObjectConverters.IsNotNull}}" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Ursa.Themes.Semi/Converters/BrushToColorConverter.cs b/src/Ursa.Themes.Semi/Converters/BrushToColorConverter.cs
index 425c6d2..e8074a2 100644
--- a/src/Ursa.Themes.Semi/Converters/BrushToColorConverter.cs
+++ b/src/Ursa.Themes.Semi/Converters/BrushToColorConverter.cs
@@ -1,4 +1,5 @@
using System.Globalization;
+using Avalonia;
using Avalonia.Data.Converters;
using Avalonia.Media;
@@ -12,7 +13,7 @@ public class BrushToColorConverter: IValueConverter
{
return b.Color;
}
- return null;
+ return Colors.Transparent;
}
public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
diff --git a/src/Ursa.Themes.Semi/Themes/Dark/Loading.axaml b/src/Ursa.Themes.Semi/Themes/Dark/Loading.axaml
new file mode 100644
index 0000000..bcaa9b5
--- /dev/null
+++ b/src/Ursa.Themes.Semi/Themes/Dark/Loading.axaml
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/src/Ursa.Themes.Semi/Themes/Dark/_index.axaml b/src/Ursa.Themes.Semi/Themes/Dark/_index.axaml
index cc3a735..025d14f 100644
--- a/src/Ursa.Themes.Semi/Themes/Dark/_index.axaml
+++ b/src/Ursa.Themes.Semi/Themes/Dark/_index.axaml
@@ -5,6 +5,7 @@
+
diff --git a/src/Ursa.Themes.Semi/Themes/Light/Loading.axaml b/src/Ursa.Themes.Semi/Themes/Light/Loading.axaml
new file mode 100644
index 0000000..5680405
--- /dev/null
+++ b/src/Ursa.Themes.Semi/Themes/Light/Loading.axaml
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/src/Ursa.Themes.Semi/Themes/Light/_index.axaml b/src/Ursa.Themes.Semi/Themes/Light/_index.axaml
index cc3a735..025d14f 100644
--- a/src/Ursa.Themes.Semi/Themes/Light/_index.axaml
+++ b/src/Ursa.Themes.Semi/Themes/Light/_index.axaml
@@ -5,6 +5,7 @@
+
diff --git a/src/Ursa/Controls/Loading/LoadingContainer.cs b/src/Ursa/Controls/Loading/LoadingContainer.cs
new file mode 100644
index 0000000..024d678
--- /dev/null
+++ b/src/Ursa/Controls/Loading/LoadingContainer.cs
@@ -0,0 +1,59 @@
+using Avalonia;
+using Avalonia.Controls;
+using Avalonia.Controls.Metadata;
+using Avalonia.Controls.Templates;
+
+namespace Ursa.Controls;
+
+[PseudoClasses(PC_Loading)]
+public class LoadingContainer: ContentControl
+{
+ public const string PC_Loading = ":loading";
+
+ public static readonly StyledProperty