From 7c11ad7e465ec233b268aab5819a387e2769ae2d Mon Sep 17 00:00:00 2001 From: Kangho Hur Date: Fri, 18 Jun 2021 07:51:38 +0900 Subject: [PATCH] Bump to latest - Including register images and set Compat Service Provider (#1306), and so on --- src/Compatibility/Core/src/AppHostBuilderExtensions.cs | 4 ++++ src/Core/src/Handlers/Entry/EntryHandler.Tizen.cs | 5 +++++ src/Core/src/Platform/Tizen/EntryExtensions.cs | 6 ++++++ 3 files changed, 15 insertions(+) diff --git a/src/Compatibility/Core/src/AppHostBuilderExtensions.cs b/src/Compatibility/Core/src/AppHostBuilderExtensions.cs index 4c3295e2d076..d991265767b0 100644 --- a/src/Compatibility/Core/src/AppHostBuilderExtensions.cs +++ b/src/Compatibility/Core/src/AppHostBuilderExtensions.cs @@ -38,6 +38,8 @@ using BoxRenderer = Microsoft.Maui.Controls.Compatibility.Platform.Tizen.BoxViewRenderer; using CollectionViewRenderer = Microsoft.Maui.Controls.Compatibility.Platform.Tizen.StructuredItemsViewRenderer; using OpenGLViewRenderer = Microsoft.Maui.Controls.Compatibility.Platform.Tizen.DefaultRenderer; +using StreamImagesourceHandler = Microsoft.Maui.Controls.Compatibility.Platform.Tizen.StreamImageSourceHandler; +using ImageLoaderSourceHandler = Microsoft.Maui.Controls.Compatibility.Platform.Tizen.UriImageSourceHandler; #endif namespace Microsoft.Maui.Controls.Compatibility.Hosting @@ -98,7 +100,9 @@ public static MauiAppBuilder UseMauiCompatibility(this MauiAppBuilder builder) Internals.Registrar.Registered.Register(typeof(FileImageSource), typeof(FileImageSourceHandler)); Internals.Registrar.Registered.Register(typeof(StreamImageSource), typeof(StreamImagesourceHandler)); Internals.Registrar.Registered.Register(typeof(UriImageSource), typeof(ImageLoaderSourceHandler)); +#if !TIZEN Internals.Registrar.Registered.Register(typeof(FontImageSource), typeof(FontImageSourceHandler)); +#endif Internals.Registrar.Registered.Register(typeof(Microsoft.Maui.EmbeddedFont), typeof(Microsoft.Maui.EmbeddedFontLoader)); #endif diff --git a/src/Core/src/Handlers/Entry/EntryHandler.Tizen.cs b/src/Core/src/Handlers/Entry/EntryHandler.Tizen.cs index 01df1b029a1d..f68e75a643a8 100644 --- a/src/Core/src/Handlers/Entry/EntryHandler.Tizen.cs +++ b/src/Core/src/Handlers/Entry/EntryHandler.Tizen.cs @@ -80,6 +80,11 @@ public static void MapHorizontalTextAlignment(EntryHandler handler, IEntry entry handler.NativeView?.UpdateHorizontalTextAlignment(entry); } + public static void MapVerticalTextAlignment(EntryHandler handler, IEntry entry) + { + handler?.NativeView?.UpdateVerticalTextAlignment(entry); + } + public static void MapMaxLength(EntryHandler handler, IEntry entry) { handler.NativeView?.UpdateMaxLength(entry); diff --git a/src/Core/src/Platform/Tizen/EntryExtensions.cs b/src/Core/src/Platform/Tizen/EntryExtensions.cs index ce60baee45bd..bb2aeab857f1 100644 --- a/src/Core/src/Platform/Tizen/EntryExtensions.cs +++ b/src/Core/src/Platform/Tizen/EntryExtensions.cs @@ -24,6 +24,12 @@ public static void UpdateHorizontalTextAlignment(this Entry nativeEntry, ITextAl nativeEntry.HorizontalTextAlignment = entry.HorizontalTextAlignment.ToNative(); } + public static void UpdateVerticalTextAlignment(this Entry nativeEntry, ITextAlignment entry) + { + nativeEntry.SetVerticalTextAlignment(entry.VerticalTextAlignment.ToNativeDouble()); + nativeEntry.SetVerticalPlaceHolderTextAlignment(entry.VerticalTextAlignment.ToNativeDouble()); + } + public static void UpdateIsPassword(this Entry nativeEntry, IEntry entry) { nativeEntry.IsPassword = entry.IsPassword;