Frame completed

This commit is contained in:
2026-01-16 05:31:21 +00:00
parent 538d4bad65
commit 1b1619de06
2 changed files with 7 additions and 9 deletions

View File

@@ -67,11 +67,7 @@ public partial class FrameHandler : ViewHandler<Frame, SkiaFrame>
{ {
if (frame.BorderColor != null) if (frame.BorderColor != null)
{ {
handler.PlatformView.Stroke = new SKColor( handler.PlatformView.Stroke = frame.BorderColor;
(byte)(frame.BorderColor.Red * 255),
(byte)(frame.BorderColor.Green * 255),
(byte)(frame.BorderColor.Blue * 255),
(byte)(frame.BorderColor.Alpha * 255));
} }
} }

View File

@@ -1,6 +1,7 @@
// Licensed to the .NET Foundation under one or more agreements. // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license. // The .NET Foundation licenses this file to you under the MIT license.
using Microsoft.Maui.Graphics;
using SkiaSharp; using SkiaSharp;
namespace Microsoft.Maui.Platform; namespace Microsoft.Maui.Platform;
@@ -8,16 +9,17 @@ namespace Microsoft.Maui.Platform;
/// <summary> /// <summary>
/// Frame control - a Border with shadow enabled by default. /// Frame control - a Border with shadow enabled by default.
/// Mimics the MAUI Frame control appearance. /// Mimics the MAUI Frame control appearance.
/// Implements MAUI IFrame interface patterns.
/// </summary> /// </summary>
public class SkiaFrame : SkiaBorder public class SkiaFrame : SkiaBorder
{ {
public SkiaFrame() public SkiaFrame()
{ {
HasShadow = true; HasShadow = true;
CornerRadius = 4f; CornerRadius = 4.0;
SetPadding(10f); SetPadding(10.0);
BackgroundColor = SKColors.White; BackgroundColor = SKColors.White;
Stroke = SKColors.Transparent; Stroke = Colors.Transparent;
StrokeThickness = 0f; StrokeThickness = 0.0;
} }
} }