diff --git a/Terminal.Gui/Types/Rectangle.cs b/Terminal.Gui/Types/Rectangle.cs
index e8026a43c..0b1c262b2 100644
--- a/Terminal.Gui/Types/Rectangle.cs
+++ b/Terminal.Gui/Types/Rectangle.cs
@@ -287,5 +287,5 @@ public struct Rectangle
/// ToString Method
/// Formats the Rectangle as a string in (x,y,w,h) notation.
- public override string ToString () { return $"({X},{Y},{Width},{Height})"; }
+ public override string ToString () { return $"{{X={X},Y={Y},Width={Width},Height={Height}}}"; }
}
diff --git a/UnitTests/Types/RectangleTests.cs b/UnitTests/Types/RectangleTests.cs
index 812f373af..2878d7071 100644
--- a/UnitTests/Types/RectangleTests.cs
+++ b/UnitTests/Types/RectangleTests.cs
@@ -513,7 +513,7 @@ public class RectangleTests
public void ToString_ReturnsExpectedString ([CombinatorialValues(-1,0,1)]int x, [CombinatorialValues(-1,0,1)]int y, [CombinatorialValues(1,10)]int width, [CombinatorialValues(1,10)]int height)
{
Rectangle r = new (x, y, width, height);
- string expectedString = $"({r.X},{r.Y},{r.Width},{r.Height})";
+ string expectedString = $"{{X={r.X},Y={r.Y},Width={r.Width},Height={r.Height}}}";
Assert.Equal (expectedString, r.ToString ());
}
}