PlatformEffect<TContainer,TControl> PlatformEffect<TContainer,TControl> Class


Base class for platform-specific effect classes.

public abstract class PlatformEffect<TContainer,TControl> : Xamarin.Forms.Effect where TContainer : class where TControl : class
type PlatformEffect<'Container, 'Control (requires 'Container : null and 'Control : null)> = class
    inherit Effect

Type Parameters



App developers derive from the

  • Xamarin.Forms.Platform.Android.PlatformEffect,
  • Xamarin.Forms.Platform.iOS.PlatformEffect,
  • Xamarin.Forms.Platform.UWP.PlatformEffect
  • Xamarin.Forms.Platform.WinPhone.PlatformEffect, or
  • Xamarin.Forms.Platform.WinRT.PlatformEffect,
classes to implement effects on the respective platforms.


PlatformEffect<TContainer,TControl>() PlatformEffect<TContainer,TControl>()

Creates a new platform-specific effect with default values.


Container Container

Returns the container for the platform-specific effect.

Control Control

Returns the control for the platform-specific effect.

Element Element

Gets the element to which the style is attached.

(Inherited from Effect)
IsAttached IsAttached

Gets a value that tells whether the effect is attached to an element.

(Inherited from Effect)
ResolveId ResolveId

Gets the ID that is used to resolve this effect at runtime.

(Inherited from Effect)


OnAttached() OnAttached()

Method that is called after the effect is attached and made valid.

(Inherited from Effect)
OnDetached() OnDetached()

Method that is called after the effect is detached and invalidated.

(Inherited from Effect)
OnElementPropertyChanged(PropertyChangedEventArgs) OnElementPropertyChanged(PropertyChangedEventArgs)

Method that is called when a element property has changed.

SetContainer(TContainer) SetContainer(TContainer)

For internal use by the Xamarin.Forms platform.

SetControl(TControl) SetControl(TControl)

For internal use by the Xamarin.Forms platform.

Extension Methods

LoadFromXaml<TXaml>(TXaml, String) LoadFromXaml<TXaml>(TXaml, String)

Returns an initialized view by loading the specified xaml.

LoadFromXaml<TXaml>(TXaml, Type) LoadFromXaml<TXaml>(TXaml, Type)

Returns a TXaml with the properties that are defined in the application manifest for callingType.

Applies to