internal static void UpdateMauiDrawable(this AView platformView, IBorderStroke border) { bool hasBorder = border.Shape != null; if (!hasBorder) { return; } MauiDrawable?mauiDrawable = platformView.Background as MauiDrawable; if (mauiDrawable == null) { mauiDrawable = new MauiDrawable(platformView.Context); platformView.Background = mauiDrawable; } if (border is IView v) { mauiDrawable.SetBackground(v.Background); } else { mauiDrawable.SetBackground(new SolidPaint(Colors.Transparent)); } mauiDrawable.SetBorderShape(border.Shape); if (platformView is ContentViewGroup contentViewGroup) { contentViewGroup.Clip = border; } }
public static void UpdateBackground(this ContentView platformView, IBorderStroke border) { bool hasBorder = border.Shape != null && border.Stroke != null; if (hasBorder) { platformView.UpdateMauiCALayer(border); } }
public static void UpdateStrokeLineCap(this EvasObject platformView, IBorderStroke border) { var canvas = platformView as BorderView; bool hasBorder = border.Shape != null && border.Stroke != null; if (canvas == null && !hasBorder) { return; } platformView.UpdateMauiDrawable(border); }
public static void UpdateStrokeShape(this ContentPanel platformView, IBorderStroke border) { var shape = border.Shape; if (shape == null) { return; } platformView.UpdateBorderShape(shape); }
public static void UpdateStrokeDashPattern(this ContentPanel platformView, IBorderStroke border) { var strokeDashPattern = border.StrokeDashPattern; if (strokeDashPattern == null) { return; } platformView.UpdateStrokeDashPattern(strokeDashPattern); }
public static void UpdateStroke(this ContentPanel platformView, IBorderStroke border) { var stroke = border.Stroke; if (stroke == null) { return; } platformView.BorderPath?.UpdateStroke(stroke); }
public static void UpdateStrokeShape(this EvasObject platformView, IBorderStroke border) { var borderShape = border.Shape; var canvas = platformView as BorderView; if (canvas == null && borderShape == null) { return; } platformView.UpdateMauiDrawable(border); }
public static void UpdateStroke(this EvasObject platformView, IBorderStroke border) { var stroke = border.Stroke; var canvas = platformView as BorderView; if (canvas == null && stroke.IsNullOrEmpty()) { return; } platformView.UpdateMauiDrawable(border); }
public static void UpdateStrokeShape(this UIView platformView, IBorderStroke border) { var borderShape = border.Shape; CALayer?backgroundLayer = platformView.Layer as MauiCALayer; if (backgroundLayer == null && borderShape == null) { return; } platformView.UpdateMauiCALayer(border); }
public static void UpdateStrokeShape(this AView platformView, IBorderStroke border) { var borderShape = border.Shape; MauiDrawable?mauiDrawable = platformView.Background as MauiDrawable; if (mauiDrawable == null && borderShape == null) { return; } platformView.UpdateMauiDrawable(border); }
public static void UpdateStrokeLineCap(this UIView platformView, IBorderStroke border) { CALayer?backgroundLayer = platformView.Layer as MauiCALayer; bool hasBorder = border.Shape != null && border.Stroke != null; if (backgroundLayer == null && !hasBorder) { return; } platformView.UpdateMauiCALayer(border); }
public static void UpdateStrokeThickness(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?.SetBorderWidth(border.StrokeThickness); }
public static void UpdateStroke(this UIView platformView, IBorderStroke border) { var borderBrush = border.Stroke; CALayer?backgroundLayer = platformView.Layer as MauiCALayer; if (backgroundLayer == null && borderBrush.IsNullOrEmpty()) { return; } platformView.UpdateMauiCALayer(border); }
public static void UpdateStrokeDashOffset(this ContentPanel platformView, IBorderStroke border) { bool hasBorder = border.Shape != null && border.Stroke != null; if (!hasBorder) { return; } var strokeDashOffset = border.StrokeDashOffset; platformView.BorderPath?.UpdateBorderDashOffset(strokeDashOffset); }
public static void UpdateStrokeLineJoin(this ContentPanel platformView, IBorderStroke border) { bool hasBorder = border.Shape != null && border.Stroke != null; if (!hasBorder) { return; } var strokeLineJoin = border.StrokeLineJoin; platformView.UpdateStrokeLineJoin(strokeLineJoin); }
public static void UpdateStrokeMiterLimit(this ContentPanel platformView, IBorderStroke border) { bool hasBorder = border.Shape != null && border.Stroke != null; if (!hasBorder) { return; } var strokeMiterLimit = border.StrokeMiterLimit; platformView.UpdateStrokeMiterLimit(strokeMiterLimit); }
public static void UpdateStrokeDashPattern(this EvasObject platformView, IBorderStroke border) { var strokeDashPattern = border.StrokeDashPattern; var canvas = platformView as BorderView; bool hasBorder = border.Shape != null && border.Stroke != null; if (canvas == null && !hasBorder && (strokeDashPattern == null || strokeDashPattern.Length == 0)) { return; } platformView.UpdateMauiDrawable(border); }
public static void UpdateBackground(this ContentPanel platformView, IBorderStroke border) { var hasBorder = border.Shape != null && border.Stroke != null; if (hasBorder) { platformView?.UpdateBorderBackground(border); } else if (border is IView v) { platformView?.UpdatePlatformViewBackground(v); } }
public static void UpdateStrokeThickness(this ContentPanel platformView, IBorderStroke border) { bool hasBorder = border.Shape != null && border.Stroke != null; if (!hasBorder) { return; } var strokeThickness = border.StrokeThickness; platformView.UpdateStrokeThickness(strokeThickness); }
public static void UpdateStroke(this AView platformView, IBorderStroke border) { var stroke = border.Stroke; MauiDrawable?mauiDrawable = platformView.Background as MauiDrawable; if (mauiDrawable == null && stroke.IsNullOrEmpty()) { return; } platformView.UpdateMauiDrawable(border); mauiDrawable?.SetBorderBrush(border.Stroke); }
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 UpdateStrokeLineCap(this ContentPanel platformView, IBorderStroke border) { bool hasBorder = border.Shape != null && border.Stroke != null; if (!hasBorder) { return; } var strokeLineCap = border.StrokeLineCap; platformView.BorderPath?.UpdateStrokeLineCap(strokeLineCap); }
public static void UpdateStrokeDashOffset(this UIView platformView, IBorderStroke border) { var strokeDashPattern = border.StrokeDashPattern; CALayer?backgroundLayer = platformView.Layer as MauiCALayer; bool hasBorder = border.Shape != null && border.Stroke != null; if (backgroundLayer == null && !hasBorder && (strokeDashPattern == null || strokeDashPattern.Length == 0)) { return; } platformView.UpdateMauiCALayer(border); }
internal static void UpdateMauiDrawable(this EvasObject platformView, IBorderStroke border) { bool hasBorder = border.Shape != null && border.Stroke != null; if (!hasBorder) { return; } if (platformView is BorderView borderView) { borderView.ContainerView?.UpdateBorder(border); } }
public static void UpdateBorderStroke(this AView platformView, IBorderStroke border) { // Always set the drawable first platformView.UpdateMauiDrawable(border); var borderShape = border.Shape; MauiDrawable?mauiDrawable = platformView.Background as MauiDrawable; if (mauiDrawable == null && borderShape == null) { return; } mauiDrawable?.SetBorderBrush(border.Stroke); mauiDrawable?.SetBorderWidth(border.StrokeThickness); platformView.UpdateStrokeDashPattern(border); platformView.UpdateStrokeDashOffset(border); mauiDrawable?.SetBorderMiterLimit(border.StrokeMiterLimit); mauiDrawable?.SetBorderLineCap(border.StrokeLineCap); mauiDrawable?.SetBorderLineJoin(border.StrokeLineJoin); }
public static void UpdateStroke(this object platformView, IBorderStroke border) { }
internal static void UpdateBorderBackground(this FrameworkElement platformView, IBorderStroke border) { if (border is IView v) { (platformView as ContentPanel)?.UpdateBackground(v.Background); } if (platformView is Control control) { control.UpdateBackground((Paint?)null); } else if (platformView is Border b) { b.UpdateBackground(null); } else if (platformView is Panel panel) { panel.UpdateBackground(null); } }
public void UpdateBorder(IBorderStroke border) { ((MauiDrawable)_drawableCanvas.Value.Drawable).Border = border; UpdateShape(border.Shape); }