Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 37 additions & 0 deletions src/Controls/tests/TestCases.HostApp/Issues/Issue29661.cs
Original file line number Diff line number Diff line change
@@ -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;
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -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();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pending snapshots already available in the latest build.
image
Could you commit the images?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jsuarezruiz, I have added the snapshots for all platforms. Please let me know if any concerns

}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/Core/src/Platform/iOS/MauiCALayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ void DrawGradientPaint(CGContext graphics, Paint paint)

bool IsBorderDashed()
{
return _strokeDash != null && _strokeDashOffset > 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This property determines the starting point of the dash pattern along the stroke. A negative value shifts the dash pattern in the opposite direction, which can be useful in some cases.

return _strokeDash != null;
}
}
}
Loading