diff --git a/Handlers/FrameHandler.cs b/Handlers/FrameHandler.cs index ca11b9f..211b255 100644 --- a/Handlers/FrameHandler.cs +++ b/Handlers/FrameHandler.cs @@ -67,11 +67,7 @@ public partial class FrameHandler : ViewHandler { if (frame.BorderColor != null) { - handler.PlatformView.Stroke = new SKColor( - (byte)(frame.BorderColor.Red * 255), - (byte)(frame.BorderColor.Green * 255), - (byte)(frame.BorderColor.Blue * 255), - (byte)(frame.BorderColor.Alpha * 255)); + handler.PlatformView.Stroke = frame.BorderColor; } } diff --git a/Views/SkiaFrame.cs b/Views/SkiaFrame.cs index f0dd848..abca508 100644 --- a/Views/SkiaFrame.cs +++ b/Views/SkiaFrame.cs @@ -1,6 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using Microsoft.Maui.Graphics; using SkiaSharp; namespace Microsoft.Maui.Platform; @@ -8,16 +9,17 @@ namespace Microsoft.Maui.Platform; /// /// Frame control - a Border with shadow enabled by default. /// Mimics the MAUI Frame control appearance. +/// Implements MAUI IFrame interface patterns. /// public class SkiaFrame : SkiaBorder { public SkiaFrame() { HasShadow = true; - CornerRadius = 4f; - SetPadding(10f); + CornerRadius = 4.0; + SetPadding(10.0); BackgroundColor = SKColors.White; - Stroke = SKColors.Transparent; - StrokeThickness = 0f; + Stroke = Colors.Transparent; + StrokeThickness = 0.0; } }