Class SfEffectsView
SfEffectsView is a container control that provides the out-of-the-box effects such as highlight, ripple, selection, scaling, and rotation.
Inheritance
Namespace: Syncfusion.XForms.EffectsView
Assembly: Syncfusion.Core.XForms.dll
Syntax
public class SfEffectsView : ContentView, IParentThemeElement, IThemeElement
Constructors
SfEffectsView()
Initializes a new instance of the SfEffectsView class.
Declaration
public SfEffectsView()
Fields
AngleProperty
Backing store for the Angle bindable property.
Declaration
public static readonly BindableProperty AngleProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
AutoResetEffectProperty
Backing store for the AutoResetEffect bindable property.
Declaration
public static readonly BindableProperty AutoResetEffectProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
CornerRadiusProperty
Backing store for the CornerRadius bindable property.
Declaration
public static readonly BindableProperty CornerRadiusProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
FadeOutRippleProperty
Backing store for the FadeOutRipple bindable property.
Declaration
public static readonly BindableProperty FadeOutRippleProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
HighlightColorOpacityProperty
Backing store for the
Declaration
public static readonly BindableProperty HighlightColorOpacityProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
HighlightColorProperty
Backing store for the HighlightColor bindable property.
Declaration
public static readonly BindableProperty HighlightColorProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
InitialRippleFactorProperty
Backing store for the InitialRippleFactor bindable property.
Declaration
public static readonly BindableProperty InitialRippleFactorProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
IsSelectedProperty
Backing store for the IsSelected bindable property.
Declaration
public static readonly BindableProperty IsSelectedProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
LongPressedCommandParameterProperty
Backing store for the LongPressedCommandParameter bindable property.
Declaration
public static readonly BindableProperty LongPressedCommandParameterProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
LongPressedCommandProperty
Backing store for the LongPressedCommand bindable property.
Declaration
public static readonly BindableProperty LongPressedCommandProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
LongPressEffectsProperty
Backing store for the LongPressEffects bindable property.
Declaration
public static readonly BindableProperty LongPressEffectsProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
RippleAnimationDurationProperty
Backing store for the RippleAnimationDuration bindable property.
Declaration
public static readonly BindableProperty RippleAnimationDurationProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
RippleColorOpacityProperty
Backing store for the RippleColorOpacity bindable property.
Declaration
public static readonly BindableProperty RippleColorOpacityProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
RippleColorProperty
Backing store for the RippleColor bindable property.
Declaration
public static readonly BindableProperty RippleColorProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
RotationAnimationDurationProperty
Backing store for the RotationAnimationDuration bindable property.
Declaration
public static readonly BindableProperty RotationAnimationDurationProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
ScaleAnimationDurationProperty
Backing store for the ScaleAnimationDuration bindable property.
Declaration
public static readonly BindableProperty ScaleAnimationDurationProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
ScaleFactorProperty
Backing store for the ScaleFactor bindable property.
Declaration
public static readonly BindableProperty ScaleFactorProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
SelectionColorOpacityProperty
Backing store for the SelectionColorOpacity bindable property.
Declaration
public static readonly BindableProperty SelectionColorOpacityProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
SelectionColorProperty
Backing store for the SelectionColor bindable property.
Declaration
public static readonly BindableProperty SelectionColorProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
ShouldIgnoreTouchesProperty
Backing store for the ShouldIgnoreTouches bindable property.
Declaration
public static readonly BindableProperty ShouldIgnoreTouchesProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
TouchDownCommandParameterProperty
Backing store for the TouchDownCommandParameter bindable property.
Declaration
public static readonly BindableProperty TouchDownCommandParameterProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
TouchDownCommandProperty
Backing store for the TouchDownCommand bindable property.
Declaration
public static readonly BindableProperty TouchDownCommandProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
TouchDownEffectsProperty
Backing store for the TouchDownEffects bindable property.
Declaration
public static readonly BindableProperty TouchDownEffectsProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
TouchUpCommandParameterProperty
Backing store for the TouchUpCommandParameter bindable property.
Declaration
public static readonly BindableProperty TouchUpCommandParameterProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
TouchUpCommandProperty
Backing store for the TouchUpCommand bindable property.
Declaration
public static readonly BindableProperty TouchUpCommandProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
TouchUpEffectsProperty
Backing store for the TouchUpEffects bindable property.
Declaration
public static readonly BindableProperty TouchUpEffectsProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
Properties
Angle
Gets or sets the rotation angle.
Declaration
public int Angle { get; set; }
Property Value
Type |
---|
System.Int32 |
AutoResetEffect
Gets or sets the effect that was start rendering on touch down and start removing on touch up in Android and UWP platforms.
Declaration
public AutoResetEffects AutoResetEffect { get; set; }
Property Value
Type |
---|
AutoResetEffects |
Remarks
If it is other than None then TouchDownEffects, LongPressEffects and TouchUpEffects will not work.
CornerRadius
Gets or sets the corner radius of EffectsView.
Declaration
public Thickness CornerRadius { get; set; }
Property Value
Type |
---|
Xamarin.Forms.Thickness |
FadeOutRipple
Gets or sets a value indicating whether to fade out ripple color when it gross.
Declaration
public bool FadeOutRipple { get; set; }
Property Value
Type |
---|
System.Boolean |
HighlightColor
Gets or sets the color to highlight the effects view.
Declaration
public Color HighlightColor { get; set; }
Property Value
Type |
---|
Xamarin.Forms.Color |
HighlightColorOpacity
Gets or sets a value that determines the opacity of the highlight.
Declaration
public double HighlightColorOpacity { get; set; }
Property Value
Type |
---|
System.Double |
InitialRippleFactor
Gets or sets the ripple effect of initial radius factor.
Declaration
public double InitialRippleFactor { get; set; }
Property Value
Type |
---|
System.Double |
IsSelected
Gets or sets a value indicating whether to set the view state as selected.
Declaration
public bool IsSelected { get; set; }
Property Value
Type |
---|
System.Boolean |
LongPressedCommand
Gets or sets the command to invoke when handling long press.
Declaration
public ICommand LongPressedCommand { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
LongPressedCommandParameter
Gets or sets the parameter to pass to the LongPressedCommand.
Declaration
public object LongPressedCommandParameter { get; set; }
Property Value
Type |
---|
System.Object |
LongPressEffects
Gets or sets the long-press effect.
Declaration
public SfEffects LongPressEffects { get; set; }
Property Value
Type |
---|
SfEffects |
RippleAnimationDuration
Gets or sets the duration of the ripple animation in milliseconds.
Declaration
public double RippleAnimationDuration { get; set; }
Property Value
Type |
---|
System.Double |
RippleColor
Gets or sets the color of the ripple.
Declaration
public Color RippleColor { get; set; }
Property Value
Type |
---|
Xamarin.Forms.Color |
RippleColorOpacity
Gets or sets a value that determines the opacity of the ripple.
Declaration
public double RippleColorOpacity { get; set; }
Property Value
Type |
---|
System.Double |
RotationAnimationDuration
Gets or sets the duration of the rotation animation in milliseconds.
Declaration
public double RotationAnimationDuration { get; set; }
Property Value
Type |
---|
System.Double |
ScaleAnimationDuration
Gets or sets the duration of the scale animation in milliseconds.
Declaration
public double ScaleAnimationDuration { get; set; }
Property Value
Type |
---|
System.Double |
ScaleFactor
Gets or sets the scale factor used for scale effect.
Declaration
public double ScaleFactor { get; set; }
Property Value
Type |
---|
System.Double |
SelectionColor
Gets or sets the color applied when the view is on selected state.
Declaration
public Color SelectionColor { get; set; }
Property Value
Type |
---|
Xamarin.Forms.Color |
SelectionColorOpacity
Gets or sets a value that determines the opacity of the selection.
Declaration
public double SelectionColorOpacity { get; set; }
Property Value
Type |
---|
System.Double |
ShouldIgnoreTouches
Gets or sets a value indicating whether to ignore the touches in EffectsView.
Declaration
public bool ShouldIgnoreTouches { get; set; }
Property Value
Type |
---|
System.Boolean |
TouchDownCommand
Gets or sets the command to invoke when handling touch down.
Declaration
public ICommand TouchDownCommand { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
TouchDownCommandParameter
Gets or sets the parameter to pass to the TouchDownCommand.
Declaration
public object TouchDownCommandParameter { get; set; }
Property Value
Type |
---|
System.Object |
TouchDownEffects
Gets or sets the pointer-down effect.
Declaration
public SfEffects TouchDownEffects { get; set; }
Property Value
Type |
---|
SfEffects |
TouchUpCommand
Gets or sets the command to invoke when handling touch up.
Declaration
public ICommand TouchUpCommand { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
TouchUpCommandParameter
Gets or sets the parameter to pass to the TouchUpCommand.
Declaration
public object TouchUpCommandParameter { get; set; }
Property Value
Type |
---|
System.Object |
TouchUpEffects
Gets or sets the pointer-up effect.
Declaration
public SfEffects TouchUpEffects { get; set; }
Property Value
Type |
---|
SfEffects |
Methods
ApplyEffects(SfEffects, RippleStartPosition, Nullable<Point>, Boolean)
Triggers the effects. For removing the ripple and highlight effects, call the reset method.
Declaration
public void ApplyEffects(SfEffects effects, RippleStartPosition rippleStartPosition, Nullable<Point> rippleStartPoint = null, bool repeat = false)
Parameters
Type | Name | Description |
---|---|---|
SfEffects | effects | SfEffects that needs to be applied. By default, ripple effects will be applied. |
RippleStartPosition | rippleStartPosition | RippleStartPosition can be left, top, right, bottom, or default. By default, ripple starts from the center. |
System.Nullable<System.Drawing.Point> | rippleStartPoint | RippleStartPoint where the ripple animation starts growing. By default, point value is null. |
System.Boolean | repeat | Bool value used to set whether to repeat the ripple or highlight effect. By default, value is false. |
On<T>()
Methods used to register platforms specific property and their value.
Declaration
public IPlatformElementConfiguration<T, SfEffectsView> On<T>()
where T : IConfigPlatform
Returns
Type | Description |
---|---|
Xamarin.Forms.IPlatformElementConfiguration<T, SfEffectsView> | Returns platform configuration element. |
Type Parameters
Name | Description |
---|---|
T | The type of Element |
Reset()
Removes the ripple and highlight effects.
Declaration
public void Reset()
Events
AnimationCompleted
The AnimationCompleted event occurs on direct interaction and when programmatically applied, it only occurs when touch-up is called on direct interaction and after the effects have been completed. It will not trigger the selection effect.
Declaration
public event EventHandler AnimationCompleted
Event Type
Type |
---|
System.EventHandler |
LongPressed
Occurs when handling long press.
Declaration
public event EventHandler LongPressed
Event Type
Type |
---|
System.EventHandler |
SelectionChanged
The SelectionChanged event triggers both the rendering of Selection by direct interaction and the IsSelected property changed.
Declaration
public event EventHandler SelectionChanged
Event Type
Type |
---|
System.EventHandler |
TouchDown
Occurs when handling touch down.
Declaration
public event EventHandler TouchDown
Event Type
Type |
---|
System.EventHandler |
TouchUp
Occurs when handling touch up.
Declaration
public event EventHandler TouchUp
Event Type
Type |
---|
System.EventHandler |