diff --git a/src/Avalonia.Base/Media/BoxShadow.cs b/src/Avalonia.Base/Media/BoxShadow.cs
index cc97d89cfc..a9f073df67 100644
--- a/src/Avalonia.Base/Media/BoxShadow.cs
+++ b/src/Avalonia.Base/Media/BoxShadow.cs
@@ -45,7 +45,14 @@ namespace Avalonia.Media
}
}
- public bool IsEmpty => OffsetX == 0 && OffsetY == 0 && Blur == 0 && Spread == 0;
+ ///
+ /// Gets a value indicating whether the instance has default values.
+ ///
+ public bool IsDefault => OffsetX == 0 && OffsetY == 0 && Blur == 0 && Spread == 0;
+
+ ///
+ [Obsolete("Use IsDefault instead.")]
+ public bool IsEmpty => IsDefault;
private readonly static char[] s_Separator = new char[] { ' ', '\t' };
@@ -82,7 +89,7 @@ namespace Avalonia.Media
{
var sb = StringBuilderCache.Acquire();
- if (IsEmpty)
+ if (IsDefault)
{
return "none";
}
diff --git a/src/Avalonia.Base/Media/BoxShadows.cs b/src/Avalonia.Base/Media/BoxShadows.cs
index ab2694389f..136f37a42b 100644
--- a/src/Avalonia.Base/Media/BoxShadows.cs
+++ b/src/Avalonia.Base/Media/BoxShadows.cs
@@ -21,7 +21,7 @@ namespace Avalonia.Media
{
_first = shadow;
_list = null;
- Count = _first.IsEmpty ? 0 : 1;
+ Count = _first.IsDefault ? 0 : 1;
}
public BoxShadows(BoxShadow first, BoxShadow[] rest)
@@ -118,7 +118,7 @@ namespace Avalonia.Media
get
{
foreach(var boxShadow in this)
- if (!boxShadow.IsEmpty && boxShadow.IsInset)
+ if (!boxShadow.IsDefault && boxShadow.IsInset)
return true;
return false;
}
diff --git a/src/Skia/Avalonia.Skia/DrawingContextImpl.cs b/src/Skia/Avalonia.Skia/DrawingContextImpl.cs
index 6dcafdcfd7..0a1bbe558b 100644
--- a/src/Skia/Avalonia.Skia/DrawingContextImpl.cs
+++ b/src/Skia/Avalonia.Skia/DrawingContextImpl.cs
@@ -362,7 +362,7 @@ namespace Avalonia.Skia
foreach (var boxShadow in boxShadows)
{
- if (!boxShadow.IsEmpty && !boxShadow.IsInset)
+ if (!boxShadow.IsDefault && !boxShadow.IsInset)
{
using (var shadow = BoxShadowFilter.Create(_boxShadowPaint, boxShadow, _currentOpacity))
{
@@ -418,7 +418,7 @@ namespace Avalonia.Skia
foreach (var boxShadow in boxShadows)
{
- if (!boxShadow.IsEmpty && boxShadow.IsInset)
+ if (!boxShadow.IsDefault && boxShadow.IsInset)
{
using (var shadow = BoxShadowFilter.Create(_boxShadowPaint, boxShadow, _currentOpacity))
{