What are Effects and when should they be used?

Technology CommunityCategory: XamarinWhat are Effects and when should they be used?
VietMX Staff asked 3 years ago

Effects, like Custom Renderers, allow a developer to customize controls for a specific platform. Effects are preferred over Custom Renderers when small styling changes are required instead of a complete layout or behavior change. Custom Effects are created for platform-specific projects by extending the base class PlatformEffect. Once created, they can be attached to the control it is meant for.

Effects don’t have any type related information about the control they are attached to and hence if they are specified with a wrong control they should gracefully degrade.

Effects are reusable and can be parameterised to extend its reusability.