Skip to content
Discussion options

You must be logged in to vote

I have found that this can be achieved in 2 ways:

  1. Continue using Maui.Controls.Handlers.Compatibility.ViewRenderer<XF, A> which doesn't require .UseMauiCompatibility() and use your custom renderer as a handler handlers.AddHandler<XFUserControl1, MyEffectRenderer<XFUserControl1, Android.Views.View>>();.

  2. Implement ContentViewGroup if your control is based on ContentView, which is more in line with the MAUI approach.

                ContentViewHandler.PlatformViewFactory = (viewHandler) => {
                    if (viewHandler.VirtualView is XFUserControl1)
                        return new CustomContentViewGroup(viewHandler.Context);
                    else
                        r…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by JTOne123
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant