diff --git a/samples/ControlCatalog/Pages/ImagePage.xaml.cs b/samples/ControlCatalog/Pages/ImagePage.xaml.cs index 00878dc5a8..5b3169a1b0 100644 --- a/samples/ControlCatalog/Pages/ImagePage.xaml.cs +++ b/samples/ControlCatalog/Pages/ImagePage.xaml.cs @@ -70,7 +70,7 @@ namespace ControlCatalog.Pages 3 => new PixelRect(new PixelPoint(bitmapWidth - cropSize.Width, 0), cropSize), 4 => new PixelRect(new PixelPoint(0, bitmapHeight - cropSize.Height), cropSize), 5 => new PixelRect(new PixelPoint(bitmapWidth - cropSize.Width, bitmapHeight - cropSize.Height), cropSize), - _ => PixelRect.Default + _ => default }; } diff --git a/src/Avalonia.Base/PixelRect.cs b/src/Avalonia.Base/PixelRect.cs index 330edbd872..469f33e7fd 100644 --- a/src/Avalonia.Base/PixelRect.cs +++ b/src/Avalonia.Base/PixelRect.cs @@ -10,13 +10,10 @@ namespace Avalonia public readonly struct PixelRect : IEquatable { /// - /// A shared default instance representing an empty rectangle. + /// An empty rectangle. /// - public static readonly PixelRect Default = default; - - /// - [Obsolete("Use Default instead.")] - public static readonly PixelRect Empty = Default; + [Obsolete("Use the default keyword instead.")] + public static readonly PixelRect Empty = default; /// /// Initializes a new instance of the structure. @@ -265,7 +262,7 @@ namespace Avalonia } else { - return Default; + return default; } }