예제 #1
0
        public static IMauiHandlersCollection AddCompatibilityRenderer(this IMauiHandlersCollection handlersCollection, Type controlType, Type rendererType)
        {
            FormsCompatBuilder.AddRenderer(controlType, rendererType);

            handlersCollection.AddHandler(controlType, typeof(RendererToHandlerShim));

            return(handlersCollection);
        }
예제 #2
0
        public static IMauiHandlersCollection AddCompatibilityRenderer <TControlType, TMauiType, TRenderer>(this IMauiHandlersCollection handlersCollection)
            where TMauiType : IFrameworkElement
        {
            FormsCompatBuilder.AddRenderer(typeof(TControlType), typeof(TRenderer));

            handlersCollection.AddHandler <TMauiType, RendererToHandlerShim>();

            return(handlersCollection);
        }