Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bump to latest
Browse files Browse the repository at this point in the history
- Including register images and set Compat Service Provider (dotnet#1306), and so on
rookiejava committed Apr 10, 2022
1 parent 57b512a commit 6b45412
Showing 3 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Compatibility/Core/src/AppHostBuilderExtensions.cs
Original file line number Diff line number Diff line change
@@ -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

5 changes: 5 additions & 0 deletions src/Core/src/Handlers/Entry/EntryHandler.Tizen.cs
Original file line number Diff line number Diff line change
@@ -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);
6 changes: 6 additions & 0 deletions src/Core/src/Platform/Tizen/EntryExtensions.cs
Original file line number Diff line number Diff line change
@@ -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;

0 comments on commit 6b45412

Please sign in to comment.