Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Register images and set Compat Service Provider #1306

Merged
merged 5 commits into from
Jun 14, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Gone!
mattleibow committed Jun 14, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 3224c227e19abc27aa5ac43fbb94f4f11f3d06d2
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@ public static class MauiHandlersCollectionExtensions
{
public static IMauiHandlersCollection TryAddCompatibilityRenderer(this IMauiHandlersCollection handlersCollection, Type controlType, Type rendererType)
{
// This will eventually get copied to the all the other adds once we get rid of FormsCompatBuilder
Internals.Registrar.Registered.Register(controlType, rendererType);

#if __ANDROID__ || __IOS__ || WINDOWS || MACCATALYST
@@ -20,7 +19,7 @@ public static IMauiHandlersCollection TryAddCompatibilityRenderer(this IMauiHand

public static IMauiHandlersCollection AddCompatibilityRenderer(this IMauiHandlersCollection handlersCollection, Type controlType, Type rendererType)
{
FormsCompatBuilder.AddRenderer(controlType, rendererType);
Internals.Registrar.Registered.Register(controlType, rendererType);

#if __ANDROID__ || __IOS__ || WINDOWS || MACCATALYST
handlersCollection.AddHandler(controlType, typeof(RendererToHandlerShim));
@@ -32,7 +31,7 @@ public static IMauiHandlersCollection AddCompatibilityRenderer(this IMauiHandler
public static IMauiHandlersCollection AddCompatibilityRenderer<TControlType, TMauiType, TRenderer>(this IMauiHandlersCollection handlersCollection)
where TMauiType : IFrameworkElement
{
FormsCompatBuilder.AddRenderer(typeof(TControlType), typeof(TRenderer));
Internals.Registrar.Registered.Register(typeof(TControlType), typeof(TRenderer));

#if __ANDROID__ || __IOS__ || WINDOWS || MACCATALYST
handlersCollection.AddHandler<TMauiType, RendererToHandlerShim>();