diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyBorderWithStrokeDashArray.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyBorderWithStrokeDashArray.png new file mode 100644 index 000000000000..42f4f0dc96d7 Binary files /dev/null and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/VerifyBorderWithStrokeDashArray.png differ diff --git a/src/Controls/tests/TestCases.HostApp/Issues/Issue29661.cs b/src/Controls/tests/TestCases.HostApp/Issues/Issue29661.cs new file mode 100644 index 000000000000..3726a23317f1 --- /dev/null +++ b/src/Controls/tests/TestCases.HostApp/Issues/Issue29661.cs @@ -0,0 +1,37 @@ +using System.Collections.ObjectModel; + +namespace Maui.Controls.Sample.Issues; +[Issue(IssueTracker.Github, 29661, "[iOS, Mac] StrokeDashArray Property not Rendering", PlatformAffected.iOS)] +public class Issue29661 : ContentPage +{ + public Issue29661() + { + var label = new Label + { + Text = "Test for Border with StrokeDashArray", + AutomationId = "StrokeDashArrayLabel", + HorizontalOptions = LayoutOptions.Center, + FontSize = 16 + }; + + var border = new Border + { + HeightRequest = 200, + WidthRequest = 200, + BackgroundColor = Colors.LightGray, + Stroke = Colors.Blue, + StrokeThickness = 5, + StrokeDashArray = new DoubleCollection { 10, 5 } + }; + + var layout = new VerticalStackLayout + { + Spacing = 25, + Padding = new Thickness(30, 60, 30, 30), + VerticalOptions = LayoutOptions.Center, + Children = { label, border } + }; + + Content = layout; + } +} \ No newline at end of file diff --git a/src/Controls/tests/TestCases.Mac.Tests/snapshots/mac/VerifyBorderWithStrokeDashArray.png b/src/Controls/tests/TestCases.Mac.Tests/snapshots/mac/VerifyBorderWithStrokeDashArray.png new file mode 100644 index 000000000000..abbc9d19c3b7 Binary files /dev/null and b/src/Controls/tests/TestCases.Mac.Tests/snapshots/mac/VerifyBorderWithStrokeDashArray.png differ diff --git a/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue29661.cs b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue29661.cs new file mode 100644 index 000000000000..c8ca5ae1f18e --- /dev/null +++ b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue29661.cs @@ -0,0 +1,21 @@ +using NUnit.Framework; +using UITest.Appium; +using UITest.Core; + +namespace Microsoft.Maui.TestCases.Tests.Issues; +public class Issue29661 : _IssuesUITest +{ + public override string Issue => "[iOS, Mac] StrokeDashArray Property not Rendering"; + + public Issue29661(TestDevice device) + : base(device) + { } + + [Test] + [Category(UITestCategories.Border)] + public void VerifyBorderWithStrokeDashArray() + { + App.WaitForElement("StrokeDashArrayLabel"); + VerifyScreenshot(); + } +} \ No newline at end of file diff --git a/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/VerifyBorderWithStrokeDashArray.png b/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/VerifyBorderWithStrokeDashArray.png new file mode 100644 index 000000000000..26ba69464ad2 Binary files /dev/null and b/src/Controls/tests/TestCases.WinUI.Tests/snapshots/windows/VerifyBorderWithStrokeDashArray.png differ diff --git a/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/VerifyBorderWithStrokeDashArray.png b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/VerifyBorderWithStrokeDashArray.png new file mode 100644 index 000000000000..5f1f72430763 Binary files /dev/null and b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/VerifyBorderWithStrokeDashArray.png differ diff --git a/src/Core/src/Platform/iOS/MauiCALayer.cs b/src/Core/src/Platform/iOS/MauiCALayer.cs index 55f3485b8192..c7e7b989f010 100644 --- a/src/Core/src/Platform/iOS/MauiCALayer.cs +++ b/src/Core/src/Platform/iOS/MauiCALayer.cs @@ -417,7 +417,7 @@ void DrawGradientPaint(CGContext graphics, Paint paint) bool IsBorderDashed() { - return _strokeDash != null && _strokeDashOffset > 0; + return _strokeDash != null; } } } \ No newline at end of file