diff --git a/src/Avalonia.Base/Rect.cs b/src/Avalonia.Base/Rect.cs
index 58a8c56c8b..9c901254a6 100644
--- a/src/Avalonia.Base/Rect.cs
+++ b/src/Avalonia.Base/Rect.cs
@@ -1,7 +1,6 @@
using System;
using System.Globalization;
using System.Numerics;
-using Avalonia.Animation.Animators;
using Avalonia.Utilities;
namespace Avalonia
diff --git a/src/Avalonia.Controls/Converters/BorderGapMaskConverter.cs b/src/Avalonia.Controls/Converters/BorderGapMaskConverter.cs
new file mode 100644
index 0000000000..913b2f1534
--- /dev/null
+++ b/src/Avalonia.Controls/Converters/BorderGapMaskConverter.cs
@@ -0,0 +1,126 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using Avalonia.Controls.Shapes;
+using Avalonia.Data.Converters;
+using Avalonia.Media;
+
+namespace Avalonia.Controls.Converters
+{
+ // Ported from https://github.com/dotnet/wpf/blob/main/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/BorderGapMaskConverter.cs
+
+ ///
+ /// Converter that generates the visual brush for
+ ///
+ public class BorderGapMaskConverter : IMultiValueConverter
+ {
+ ///
+ /// Convert a value.
+ ///
+ /// values as produced by source binding
+ /// target type
+ /// converter parameter
+ /// culture information
+ ///
+ /// Converted value.
+ /// Visual Brush that is used as the opacity mask for the Border
+ /// in the style for GroupBox.
+ ///
+ public object? Convert(IList