Update with recovered code from VM binaries (Jan 1)
Recovered from decompiled OpenMaui.Controls.Linux.dll: - SkiaShell.cs: FlyoutHeader, FlyoutFooter, scroll support (918 -> 1325 lines) - X11Window.cs: Cursor support (XCreateFontCursor, XDefineCursor) - All handlers with dark mode support - All services with latest implementations - LinuxApplication with theme change handling
This commit is contained in:
@@ -1,215 +1,280 @@
|
||||
// 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.Handlers;
|
||||
using System;
|
||||
using Microsoft.Maui.Controls;
|
||||
using Microsoft.Maui.Graphics;
|
||||
using Microsoft.Maui.Handlers;
|
||||
using SkiaSharp;
|
||||
|
||||
namespace Microsoft.Maui.Platform.Linux.Handlers;
|
||||
|
||||
/// <summary>
|
||||
/// Handler for Entry on Linux using Skia rendering.
|
||||
/// Maps IEntry interface to SkiaEntry platform view.
|
||||
/// </summary>
|
||||
public partial class EntryHandler : ViewHandler<IEntry, SkiaEntry>
|
||||
public class EntryHandler : ViewHandler<IEntry, SkiaEntry>
|
||||
{
|
||||
public static IPropertyMapper<IEntry, EntryHandler> Mapper = new PropertyMapper<IEntry, EntryHandler>(ViewHandler.ViewMapper)
|
||||
{
|
||||
[nameof(ITextInput.Text)] = MapText,
|
||||
[nameof(ITextStyle.TextColor)] = MapTextColor,
|
||||
[nameof(ITextStyle.Font)] = MapFont,
|
||||
[nameof(ITextStyle.CharacterSpacing)] = MapCharacterSpacing,
|
||||
[nameof(IPlaceholder.Placeholder)] = MapPlaceholder,
|
||||
[nameof(IPlaceholder.PlaceholderColor)] = MapPlaceholderColor,
|
||||
[nameof(ITextInput.IsReadOnly)] = MapIsReadOnly,
|
||||
[nameof(ITextInput.MaxLength)] = MapMaxLength,
|
||||
[nameof(ITextInput.CursorPosition)] = MapCursorPosition,
|
||||
[nameof(ITextInput.SelectionLength)] = MapSelectionLength,
|
||||
[nameof(IEntry.IsPassword)] = MapIsPassword,
|
||||
[nameof(IEntry.ReturnType)] = MapReturnType,
|
||||
[nameof(IEntry.ClearButtonVisibility)] = MapClearButtonVisibility,
|
||||
[nameof(ITextAlignment.HorizontalTextAlignment)] = MapHorizontalTextAlignment,
|
||||
[nameof(ITextAlignment.VerticalTextAlignment)] = MapVerticalTextAlignment,
|
||||
[nameof(IView.Background)] = MapBackground,
|
||||
};
|
||||
public static IPropertyMapper<IEntry, EntryHandler> Mapper = (IPropertyMapper<IEntry, EntryHandler>)(object)new PropertyMapper<IEntry, EntryHandler>((IPropertyMapper[])(object)new IPropertyMapper[1] { (IPropertyMapper)ViewHandler.ViewMapper })
|
||||
{
|
||||
["Text"] = MapText,
|
||||
["TextColor"] = MapTextColor,
|
||||
["Font"] = MapFont,
|
||||
["CharacterSpacing"] = MapCharacterSpacing,
|
||||
["Placeholder"] = MapPlaceholder,
|
||||
["PlaceholderColor"] = MapPlaceholderColor,
|
||||
["IsReadOnly"] = MapIsReadOnly,
|
||||
["MaxLength"] = MapMaxLength,
|
||||
["CursorPosition"] = MapCursorPosition,
|
||||
["SelectionLength"] = MapSelectionLength,
|
||||
["IsPassword"] = MapIsPassword,
|
||||
["ReturnType"] = MapReturnType,
|
||||
["ClearButtonVisibility"] = MapClearButtonVisibility,
|
||||
["HorizontalTextAlignment"] = MapHorizontalTextAlignment,
|
||||
["VerticalTextAlignment"] = MapVerticalTextAlignment,
|
||||
["Background"] = MapBackground,
|
||||
["BackgroundColor"] = MapBackgroundColor
|
||||
};
|
||||
|
||||
public static CommandMapper<IEntry, EntryHandler> CommandMapper = new(ViewHandler.ViewCommandMapper)
|
||||
{
|
||||
};
|
||||
public static CommandMapper<IEntry, EntryHandler> CommandMapper = new CommandMapper<IEntry, EntryHandler>((CommandMapper)(object)ViewHandler.ViewCommandMapper);
|
||||
|
||||
public EntryHandler() : base(Mapper, CommandMapper)
|
||||
{
|
||||
}
|
||||
public EntryHandler()
|
||||
: base((IPropertyMapper)(object)Mapper, (CommandMapper)(object)CommandMapper)
|
||||
{
|
||||
}
|
||||
|
||||
public EntryHandler(IPropertyMapper? mapper, CommandMapper? commandMapper = null)
|
||||
: base(mapper ?? Mapper, commandMapper ?? CommandMapper)
|
||||
{
|
||||
}
|
||||
public EntryHandler(IPropertyMapper? mapper, CommandMapper? commandMapper = null)
|
||||
: base((IPropertyMapper)(((object)mapper) ?? ((object)Mapper)), (CommandMapper)(((object)commandMapper) ?? ((object)CommandMapper)))
|
||||
{
|
||||
}
|
||||
|
||||
protected override SkiaEntry CreatePlatformView()
|
||||
{
|
||||
return new SkiaEntry();
|
||||
}
|
||||
protected override SkiaEntry CreatePlatformView()
|
||||
{
|
||||
return new SkiaEntry();
|
||||
}
|
||||
|
||||
protected override void ConnectHandler(SkiaEntry platformView)
|
||||
{
|
||||
base.ConnectHandler(platformView);
|
||||
platformView.TextChanged += OnTextChanged;
|
||||
platformView.Completed += OnCompleted;
|
||||
}
|
||||
protected override void ConnectHandler(SkiaEntry platformView)
|
||||
{
|
||||
base.ConnectHandler(platformView);
|
||||
platformView.TextChanged += OnTextChanged;
|
||||
platformView.Completed += OnCompleted;
|
||||
}
|
||||
|
||||
protected override void DisconnectHandler(SkiaEntry platformView)
|
||||
{
|
||||
platformView.TextChanged -= OnTextChanged;
|
||||
platformView.Completed -= OnCompleted;
|
||||
base.DisconnectHandler(platformView);
|
||||
}
|
||||
protected override void DisconnectHandler(SkiaEntry platformView)
|
||||
{
|
||||
platformView.TextChanged -= OnTextChanged;
|
||||
platformView.Completed -= OnCompleted;
|
||||
base.DisconnectHandler(platformView);
|
||||
}
|
||||
|
||||
private void OnTextChanged(object? sender, Platform.TextChangedEventArgs e)
|
||||
{
|
||||
if (VirtualView is null || PlatformView is null) return;
|
||||
private void OnTextChanged(object? sender, TextChangedEventArgs e)
|
||||
{
|
||||
if (base.VirtualView != null && base.PlatformView != null && ((ITextInput)base.VirtualView).Text != e.NewTextValue)
|
||||
{
|
||||
((ITextInput)base.VirtualView).Text = e.NewTextValue ?? string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
if (VirtualView.Text != e.NewTextValue)
|
||||
{
|
||||
VirtualView.Text = e.NewTextValue ?? string.Empty;
|
||||
}
|
||||
}
|
||||
private void OnCompleted(object? sender, EventArgs e)
|
||||
{
|
||||
IEntry virtualView = base.VirtualView;
|
||||
if (virtualView != null)
|
||||
{
|
||||
virtualView.Completed();
|
||||
}
|
||||
}
|
||||
|
||||
private void OnCompleted(object? sender, EventArgs e)
|
||||
{
|
||||
VirtualView?.Completed();
|
||||
}
|
||||
public static void MapText(EntryHandler handler, IEntry entry)
|
||||
{
|
||||
if (((ViewHandler<IEntry, SkiaEntry>)(object)handler).PlatformView != null && ((ViewHandler<IEntry, SkiaEntry>)(object)handler).PlatformView.Text != ((ITextInput)entry).Text)
|
||||
{
|
||||
((ViewHandler<IEntry, SkiaEntry>)(object)handler).PlatformView.Text = ((ITextInput)entry).Text ?? string.Empty;
|
||||
((ViewHandler<IEntry, SkiaEntry>)(object)handler).PlatformView.Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
public static void MapText(EntryHandler handler, IEntry entry)
|
||||
{
|
||||
if (handler.PlatformView is null) return;
|
||||
public static void MapTextColor(EntryHandler handler, IEntry entry)
|
||||
{
|
||||
//IL_001d: Unknown result type (might be due to invalid IL or missing references)
|
||||
if (((ViewHandler<IEntry, SkiaEntry>)(object)handler).PlatformView != null && ((ITextStyle)entry).TextColor != null)
|
||||
{
|
||||
((ViewHandler<IEntry, SkiaEntry>)(object)handler).PlatformView.TextColor = ((ITextStyle)entry).TextColor.ToSKColor();
|
||||
}
|
||||
}
|
||||
|
||||
if (handler.PlatformView.Text != entry.Text)
|
||||
{
|
||||
handler.PlatformView.Text = entry.Text ?? string.Empty;
|
||||
handler.PlatformView.Invalidate();
|
||||
}
|
||||
}
|
||||
public static void MapFont(EntryHandler handler, IEntry entry)
|
||||
{
|
||||
//IL_000a: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_000f: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_005d: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0067: Invalid comparison between Unknown and I4
|
||||
//IL_0079: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_007f: Invalid comparison between Unknown and I4
|
||||
//IL_0083: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0089: Invalid comparison between Unknown and I4
|
||||
if (((ViewHandler<IEntry, SkiaEntry>)(object)handler).PlatformView != null)
|
||||
{
|
||||
Font font = ((ITextStyle)entry).Font;
|
||||
if (((Font)(ref font)).Size > 0.0)
|
||||
{
|
||||
((ViewHandler<IEntry, SkiaEntry>)(object)handler).PlatformView.FontSize = (float)((Font)(ref font)).Size;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(((Font)(ref font)).Family))
|
||||
{
|
||||
((ViewHandler<IEntry, SkiaEntry>)(object)handler).PlatformView.FontFamily = ((Font)(ref font)).Family;
|
||||
}
|
||||
((ViewHandler<IEntry, SkiaEntry>)(object)handler).PlatformView.IsBold = (int)((Font)(ref font)).Weight >= 700;
|
||||
((ViewHandler<IEntry, SkiaEntry>)(object)handler).PlatformView.IsItalic = (int)((Font)(ref font)).Slant == 1 || (int)((Font)(ref font)).Slant == 2;
|
||||
}
|
||||
}
|
||||
|
||||
public static void MapTextColor(EntryHandler handler, IEntry entry)
|
||||
{
|
||||
if (handler.PlatformView is null) return;
|
||||
public static void MapCharacterSpacing(EntryHandler handler, IEntry entry)
|
||||
{
|
||||
if (((ViewHandler<IEntry, SkiaEntry>)(object)handler).PlatformView != null)
|
||||
{
|
||||
((ViewHandler<IEntry, SkiaEntry>)(object)handler).PlatformView.CharacterSpacing = (float)((ITextStyle)entry).CharacterSpacing;
|
||||
}
|
||||
}
|
||||
|
||||
if (entry.TextColor is not null)
|
||||
handler.PlatformView.TextColor = entry.TextColor.ToSKColor();
|
||||
}
|
||||
public static void MapPlaceholder(EntryHandler handler, IEntry entry)
|
||||
{
|
||||
if (((ViewHandler<IEntry, SkiaEntry>)(object)handler).PlatformView != null)
|
||||
{
|
||||
((ViewHandler<IEntry, SkiaEntry>)(object)handler).PlatformView.Placeholder = ((IPlaceholder)entry).Placeholder ?? string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
public static void MapFont(EntryHandler handler, IEntry entry)
|
||||
{
|
||||
if (handler.PlatformView is null) return;
|
||||
public static void MapPlaceholderColor(EntryHandler handler, IEntry entry)
|
||||
{
|
||||
//IL_001d: Unknown result type (might be due to invalid IL or missing references)
|
||||
if (((ViewHandler<IEntry, SkiaEntry>)(object)handler).PlatformView != null && ((IPlaceholder)entry).PlaceholderColor != null)
|
||||
{
|
||||
((ViewHandler<IEntry, SkiaEntry>)(object)handler).PlatformView.PlaceholderColor = ((IPlaceholder)entry).PlaceholderColor.ToSKColor();
|
||||
}
|
||||
}
|
||||
|
||||
var font = entry.Font;
|
||||
if (font.Size > 0)
|
||||
handler.PlatformView.FontSize = (float)font.Size;
|
||||
public static void MapIsReadOnly(EntryHandler handler, IEntry entry)
|
||||
{
|
||||
if (((ViewHandler<IEntry, SkiaEntry>)(object)handler).PlatformView != null)
|
||||
{
|
||||
((ViewHandler<IEntry, SkiaEntry>)(object)handler).PlatformView.IsReadOnly = ((ITextInput)entry).IsReadOnly;
|
||||
}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(font.Family))
|
||||
handler.PlatformView.FontFamily = font.Family;
|
||||
public static void MapMaxLength(EntryHandler handler, IEntry entry)
|
||||
{
|
||||
if (((ViewHandler<IEntry, SkiaEntry>)(object)handler).PlatformView != null)
|
||||
{
|
||||
((ViewHandler<IEntry, SkiaEntry>)(object)handler).PlatformView.MaxLength = ((ITextInput)entry).MaxLength;
|
||||
}
|
||||
}
|
||||
|
||||
handler.PlatformView.IsBold = font.Weight >= FontWeight.Bold;
|
||||
handler.PlatformView.IsItalic = font.Slant == FontSlant.Italic || font.Slant == FontSlant.Oblique;
|
||||
}
|
||||
public static void MapCursorPosition(EntryHandler handler, IEntry entry)
|
||||
{
|
||||
if (((ViewHandler<IEntry, SkiaEntry>)(object)handler).PlatformView != null)
|
||||
{
|
||||
((ViewHandler<IEntry, SkiaEntry>)(object)handler).PlatformView.CursorPosition = ((ITextInput)entry).CursorPosition;
|
||||
}
|
||||
}
|
||||
|
||||
public static void MapCharacterSpacing(EntryHandler handler, IEntry entry)
|
||||
{
|
||||
if (handler.PlatformView is null) return;
|
||||
handler.PlatformView.CharacterSpacing = (float)entry.CharacterSpacing;
|
||||
}
|
||||
public static void MapSelectionLength(EntryHandler handler, IEntry entry)
|
||||
{
|
||||
if (((ViewHandler<IEntry, SkiaEntry>)(object)handler).PlatformView != null)
|
||||
{
|
||||
((ViewHandler<IEntry, SkiaEntry>)(object)handler).PlatformView.SelectionLength = ((ITextInput)entry).SelectionLength;
|
||||
}
|
||||
}
|
||||
|
||||
public static void MapPlaceholder(EntryHandler handler, IEntry entry)
|
||||
{
|
||||
if (handler.PlatformView is null) return;
|
||||
handler.PlatformView.Placeholder = entry.Placeholder ?? string.Empty;
|
||||
}
|
||||
public static void MapIsPassword(EntryHandler handler, IEntry entry)
|
||||
{
|
||||
if (((ViewHandler<IEntry, SkiaEntry>)(object)handler).PlatformView != null)
|
||||
{
|
||||
((ViewHandler<IEntry, SkiaEntry>)(object)handler).PlatformView.IsPassword = entry.IsPassword;
|
||||
}
|
||||
}
|
||||
|
||||
public static void MapPlaceholderColor(EntryHandler handler, IEntry entry)
|
||||
{
|
||||
if (handler.PlatformView is null) return;
|
||||
public static void MapReturnType(EntryHandler handler, IEntry entry)
|
||||
{
|
||||
_ = ((ViewHandler<IEntry, SkiaEntry>)(object)handler).PlatformView;
|
||||
}
|
||||
|
||||
if (entry.PlaceholderColor is not null)
|
||||
handler.PlatformView.PlaceholderColor = entry.PlaceholderColor.ToSKColor();
|
||||
}
|
||||
public static void MapClearButtonVisibility(EntryHandler handler, IEntry entry)
|
||||
{
|
||||
//IL_0010: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0016: Invalid comparison between Unknown and I4
|
||||
if (((ViewHandler<IEntry, SkiaEntry>)(object)handler).PlatformView != null)
|
||||
{
|
||||
((ViewHandler<IEntry, SkiaEntry>)(object)handler).PlatformView.ShowClearButton = (int)entry.ClearButtonVisibility == 1;
|
||||
}
|
||||
}
|
||||
|
||||
public static void MapIsReadOnly(EntryHandler handler, IEntry entry)
|
||||
{
|
||||
if (handler.PlatformView is null) return;
|
||||
handler.PlatformView.IsReadOnly = entry.IsReadOnly;
|
||||
}
|
||||
public static void MapHorizontalTextAlignment(EntryHandler handler, IEntry entry)
|
||||
{
|
||||
//IL_0011: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0016: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0017: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0029: Expected I4, but got Unknown
|
||||
if (((ViewHandler<IEntry, SkiaEntry>)(object)handler).PlatformView != null)
|
||||
{
|
||||
SkiaEntry platformView = ((ViewHandler<IEntry, SkiaEntry>)(object)handler).PlatformView;
|
||||
TextAlignment horizontalTextAlignment = ((ITextAlignment)entry).HorizontalTextAlignment;
|
||||
platformView.HorizontalTextAlignment = (int)horizontalTextAlignment switch
|
||||
{
|
||||
0 => TextAlignment.Start,
|
||||
1 => TextAlignment.Center,
|
||||
2 => TextAlignment.End,
|
||||
_ => TextAlignment.Start,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public static void MapMaxLength(EntryHandler handler, IEntry entry)
|
||||
{
|
||||
if (handler.PlatformView is null) return;
|
||||
handler.PlatformView.MaxLength = entry.MaxLength;
|
||||
}
|
||||
public static void MapVerticalTextAlignment(EntryHandler handler, IEntry entry)
|
||||
{
|
||||
//IL_0011: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0016: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0017: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0029: Expected I4, but got Unknown
|
||||
if (((ViewHandler<IEntry, SkiaEntry>)(object)handler).PlatformView != null)
|
||||
{
|
||||
SkiaEntry platformView = ((ViewHandler<IEntry, SkiaEntry>)(object)handler).PlatformView;
|
||||
TextAlignment verticalTextAlignment = ((ITextAlignment)entry).VerticalTextAlignment;
|
||||
platformView.VerticalTextAlignment = (int)verticalTextAlignment switch
|
||||
{
|
||||
0 => TextAlignment.Start,
|
||||
1 => TextAlignment.Center,
|
||||
2 => TextAlignment.End,
|
||||
_ => TextAlignment.Center,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public static void MapCursorPosition(EntryHandler handler, IEntry entry)
|
||||
{
|
||||
if (handler.PlatformView is null) return;
|
||||
handler.PlatformView.CursorPosition = entry.CursorPosition;
|
||||
}
|
||||
public static void MapBackground(EntryHandler handler, IEntry entry)
|
||||
{
|
||||
//IL_002c: Unknown result type (might be due to invalid IL or missing references)
|
||||
if (((ViewHandler<IEntry, SkiaEntry>)(object)handler).PlatformView != null)
|
||||
{
|
||||
Paint background = ((IView)entry).Background;
|
||||
SolidPaint val = (SolidPaint)(object)((background is SolidPaint) ? background : null);
|
||||
if (val != null && val.Color != null)
|
||||
{
|
||||
((ViewHandler<IEntry, SkiaEntry>)(object)handler).PlatformView.BackgroundColor = val.Color.ToSKColor();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void MapSelectionLength(EntryHandler handler, IEntry entry)
|
||||
{
|
||||
if (handler.PlatformView is null) return;
|
||||
handler.PlatformView.SelectionLength = entry.SelectionLength;
|
||||
}
|
||||
|
||||
public static void MapIsPassword(EntryHandler handler, IEntry entry)
|
||||
{
|
||||
if (handler.PlatformView is null) return;
|
||||
handler.PlatformView.IsPassword = entry.IsPassword;
|
||||
}
|
||||
|
||||
public static void MapReturnType(EntryHandler handler, IEntry entry)
|
||||
{
|
||||
// ReturnType affects keyboard behavior - stored for virtual keyboard integration
|
||||
if (handler.PlatformView is null) return;
|
||||
// handler.PlatformView.ReturnType = entry.ReturnType; // Would need property on SkiaEntry
|
||||
}
|
||||
|
||||
public static void MapClearButtonVisibility(EntryHandler handler, IEntry entry)
|
||||
{
|
||||
if (handler.PlatformView is null) return;
|
||||
handler.PlatformView.ShowClearButton = entry.ClearButtonVisibility == ClearButtonVisibility.WhileEditing;
|
||||
}
|
||||
|
||||
public static void MapHorizontalTextAlignment(EntryHandler handler, IEntry entry)
|
||||
{
|
||||
if (handler.PlatformView is null) return;
|
||||
|
||||
handler.PlatformView.HorizontalTextAlignment = entry.HorizontalTextAlignment switch
|
||||
{
|
||||
Microsoft.Maui.TextAlignment.Start => Platform.TextAlignment.Start,
|
||||
Microsoft.Maui.TextAlignment.Center => Platform.TextAlignment.Center,
|
||||
Microsoft.Maui.TextAlignment.End => Platform.TextAlignment.End,
|
||||
_ => Platform.TextAlignment.Start
|
||||
};
|
||||
}
|
||||
|
||||
public static void MapVerticalTextAlignment(EntryHandler handler, IEntry entry)
|
||||
{
|
||||
if (handler.PlatformView is null) return;
|
||||
|
||||
handler.PlatformView.VerticalTextAlignment = entry.VerticalTextAlignment switch
|
||||
{
|
||||
Microsoft.Maui.TextAlignment.Start => Platform.TextAlignment.Start,
|
||||
Microsoft.Maui.TextAlignment.Center => Platform.TextAlignment.Center,
|
||||
Microsoft.Maui.TextAlignment.End => Platform.TextAlignment.End,
|
||||
_ => Platform.TextAlignment.Center
|
||||
};
|
||||
}
|
||||
|
||||
public static void MapBackground(EntryHandler handler, IEntry entry)
|
||||
{
|
||||
if (handler.PlatformView is null) return;
|
||||
|
||||
if (entry.Background is SolidPaint solidPaint && solidPaint.Color is not null)
|
||||
{
|
||||
handler.PlatformView.BackgroundColor = solidPaint.Color.ToSKColor();
|
||||
}
|
||||
}
|
||||
public static void MapBackgroundColor(EntryHandler handler, IEntry entry)
|
||||
{
|
||||
//IL_0050: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0055: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_006e: Unknown result type (might be due to invalid IL or missing references)
|
||||
//IL_0086: Unknown result type (might be due to invalid IL or missing references)
|
||||
if (((ViewHandler<IEntry, SkiaEntry>)(object)handler).PlatformView == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
Entry val = (Entry)(object)((entry is Entry) ? entry : null);
|
||||
if (val != null)
|
||||
{
|
||||
Console.WriteLine($"[EntryHandler] MapBackgroundColor: {((VisualElement)val).BackgroundColor}");
|
||||
if (((VisualElement)val).BackgroundColor != null)
|
||||
{
|
||||
SKColor val2 = ((VisualElement)val).BackgroundColor.ToSKColor();
|
||||
Console.WriteLine($"[EntryHandler] Setting EntryBackgroundColor to: {val2}");
|
||||
((ViewHandler<IEntry, SkiaEntry>)(object)handler).PlatformView.EntryBackgroundColor = val2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user