public static void UpdateStrokeDashOffset(this AView platformView, IBorderStroke border) { MauiDrawable?mauiDrawable = platformView.Background as MauiDrawable; bool hasBorder = border.Shape != null && border.Stroke != null; if (mauiDrawable == null && !hasBorder) { return; } mauiDrawable?.SetBorderDash(border.StrokeDashPattern, border.StrokeDashOffset); }
public static void UpdateStrokeDashPattern(this AView nativeView, IBorder border) { var strokeDashPattern = border.StrokeDashPattern; MauiDrawable?mauiDrawable = nativeView.Background as MauiDrawable; bool hasBorder = border.Shape != null && border.Stroke != null; if (mauiDrawable == null && !hasBorder && (strokeDashPattern == null || strokeDashPattern.Length == 0)) { return; } mauiDrawable?.SetBorderDash(border.StrokeDashPattern, border.StrokeDashOffset); }