public static IMauiHandlersCollection AddHandler <TType, TTypeRender>(this IMauiHandlersCollection handlersCollection) where TType : IElement where TTypeRender : IElementHandler { handlersCollection.AddTransient(typeof(TType), typeof(TTypeRender)); return(handlersCollection); }
public static IMauiHandlersCollection AddHandlers(this IMauiHandlersCollection handlersCollection, Dictionary <Type, Type> handlers) { foreach (var handler in handlers) { handlersCollection.AddTransient(handler.Key, handler.Value); } return(handlersCollection); }
public static IMauiHandlersCollection AddHandler( this IMauiHandlersCollection handlersCollection, Type viewType, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type handlerType) { handlersCollection.AddTransient(viewType, handlerType); return(handlersCollection); }
public static IMauiHandlersCollection AddHandler <TType, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] TTypeRender>( this IMauiHandlersCollection handlersCollection) where TType : IElement where TTypeRender : IElementHandler { handlersCollection.AddTransient(typeof(TType), typeof(TTypeRender)); return(handlersCollection); }
public static IMauiHandlersCollection AddHandler(this IMauiHandlersCollection handlersCollection, Type viewType, Type handlerType) { handlersCollection.AddTransient(viewType, handlerType); return(handlersCollection); }
public static IMauiHandlersCollection AddGraphicsControlsHandlers(this IMauiHandlersCollection handlersCollection, DrawableType drawableType = DrawableType.Material) { handlersCollection.AddTransient(typeof(Button), h => new ButtonHandler(drawableType)); handlersCollection.AddTransient(typeof(CheckBox), h => new CheckBoxHandler(drawableType)); handlersCollection.AddTransient(typeof(DatePicker), h => new DatePickerHandler(drawableType)); handlersCollection.AddTransient(typeof(Editor), h => new EditorHandler(drawableType)); handlersCollection.AddTransient(typeof(Entry), h => new EntryHandler(drawableType)); handlersCollection.AddTransient(typeof(GraphicsView), typeof(GraphicsViewHandler)); handlersCollection.AddTransient(typeof(ProgressBar), h => new ProgressBarHandler(drawableType)); handlersCollection.AddTransient(typeof(Slider), h => new SliderHandler(drawableType)); handlersCollection.AddTransient(typeof(Stepper), h => new StepperHandler(drawableType)); handlersCollection.AddTransient(typeof(Switch), h => new SwitchHandler(drawableType)); handlersCollection.AddTransient(typeof(TimePicker), h => new TimePickerHandler(drawableType)); return(handlersCollection); }