Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StrokeDashArray of border control only works with StrokeDashOffset != 0 #14938

Closed
MSwit opened this issue May 5, 2023 · 3 comments
Closed

StrokeDashArray of border control only works with StrokeDashOffset != 0 #14938

MSwit opened this issue May 5, 2023 · 3 comments
Labels
area-drawing Shapes, Borders, Shadows, Graphics, BoxView, custom drawing platform/android 🤖 platform/iOS 🍎 s/triaged Issue has been reviewed s/try-latest-version Please try to reproduce the potential issue on the latest public version s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working

Comments

@MSwit
Copy link

MSwit commented May 5, 2023

Description

The StrokeDashArray of a Border control is only visible when setting the StrokeDashOffset!= 0.

example

Steps to Reproduce

  1. Create a new .NET Maui App
  2. Add code behind to the MainPage.xaml.cs like so:

namespace App;

public partial class MainPage : ContentPage
{
    public MainPage()
    {
        InitializeComponent();
        Content = new StackLayout
        {
            Spacing = 20,
            Margin = 10,
            Children = {
                new Border {
                    Stroke = Brush.Black,
                    StrokeThickness = 3,
                    Content = new Label { Text = "Without StrokeDashOffset" },
                    Padding = 10,

                    StrokeDashArray = new DoubleCollection { 2, 1 },
                    },
                new Border {
                    Stroke = Brush.Black,
                    StrokeThickness = 3,
                    Content = new Label { Text = "With StrokeDashOffset" },
                    Padding = 10,

                    StrokeDashArray = new DoubleCollection { 2, 1 },
                    StrokeDashOffset = 1,
                },
            }
        };
    }
}
  1. Start the App.

Link to public reproduction project repository

https://github.com/zauberzeug/dotnet-maui-border-control-with-strokedasharray

Version with bug

7.0 (current)

Last version that worked well

Unknown/Other

Affected platforms

iOS, Android

Affected platform versions

iOS 16, Android 12

Did you find any workaround?

When adding StrokeDashOffset = 1 the dashed array shows up.

Relevant log output

No response

@MSwit MSwit added the t/bug Something isn't working label May 5, 2023
@Eilon Eilon added the area-drawing Shapes, Borders, Shadows, Graphics, BoxView, custom drawing label May 5, 2023
@jsuarezruiz
Copy link
Contributor

Cannot reproduce on Android using the main branch:
image

Will do more tests on iOS.

@XamlTest XamlTest added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Jul 6, 2023
@XamlTest
Copy link
Collaborator

XamlTest commented Jul 6, 2023

Verified this on Visual Studio Enterprise 17.7.0 Preview 2.0. Repro on Android 13.0-API33 and iOS 16.4, not repro on Windows 11 with below Project:
App.zip

image
image
image

Copy link
Contributor

Hi @MSwit. We have added the "s/try-latest-version" label to this issue, which indicates that we'd like you to try and reproduce this issue on the latest available public version. This can happen because we think that this issue was fixed in a version that has just been released, or the information provided by you indicates that you might be working with an older version.

You can install the latest version by installing the latest Visual Studio (Preview) with the .NET MAUI workload installed. If the issue still persists, please let us know with any additional details and ideally a reproduction project provided through a GitHub repository.

This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

@jsuarezruiz jsuarezruiz added this to the Triaged milestone Jun 11, 2024
@dotnet-policy-service dotnet-policy-service bot removed this from the Triaged milestone Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-drawing Shapes, Borders, Shadows, Graphics, BoxView, custom drawing platform/android 🤖 platform/iOS 🍎 s/triaged Issue has been reviewed s/try-latest-version Please try to reproduce the potential issue on the latest public version s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants