// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using System; using Microsoft.Maui.Graphics; using SkiaSharp; namespace Microsoft.Maui.Platform; /// /// Represents an item in a swipe view. MAUI-compliant using Color types. /// public class SwipeItem { public string Text { get; set; } = string.Empty; public string? IconSource { get; set; } /// /// Background color using MAUI Color type. /// public Color BackgroundColor { get; set; } = Color.FromRgb(33, 150, 243); /// /// Text color using MAUI Color type. /// public Color TextColor { get; set; } = Colors.White; public event EventHandler? Invoked; internal void OnInvoked() { Invoked?.Invoke(this, EventArgs.Empty); } /// /// Helper to convert BackgroundColor to SKColor for rendering. /// internal SKColor GetBackgroundColorSK() => BackgroundColor.ToSKColor(); /// /// Helper to convert TextColor to SKColor for rendering. /// internal SKColor GetTextColorSK() => TextColor.ToSKColor(); }