Class ToastHideAnimationSettings
Specifies the animation configuration to be applied while hiding the Toast component.
Inheritance
Namespace: Syncfusion.Blazor.Notifications
Assembly: Syncfusion.Blazor.dll
Syntax
public class ToastHideAnimationSettings : OwningComponentBase
Remarks
The ToastHideAnimationSettings class provides comprehensive control over the animation behavior when a toast notification is dismissed or hidden. It allows customization of animation duration, easing effects, and animation types to create smooth and visually appealing hide transitions. This class works in conjunction with ToastAnimationSettings to provide complete animation control for toast notifications.
Examples
Configure hide animation settings for a toast component.
<SfToast>
<ToastAnimationSettings>
<ToastHideAnimationSettings Duration="500" Effect="ToastEffect.Fade" Easing="ToastEasing.EaseOut" />
</ToastAnimationSettings>
</SfToast>
Constructors
ToastHideAnimationSettings()
Declaration
public ToastHideAnimationSettings()
Properties
Duration
Gets or sets the duration of the hide animation in milliseconds.
Declaration
public int Duration { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | An |
Remarks
This property controls how long the hide animation takes to complete. A shorter duration creates a faster animation, while a longer duration creates a slower, more gradual animation. The duration works in combination with the Easing property to control the overall animation behavior during toast dismissal.
Easing
Gets or sets the easing function that controls the acceleration and deceleration of the hide animation.
Declaration
public ToastEasing Easing { get; set; }
Property Value
Type | Description |
---|---|
ToastEasing | A ToastEasing enumeration value that specifies the timing function for the animation. The default value depends on the toast component's default settings. |
Remarks
The easing property determines how the animation progresses over time, affecting the visual smoothness and feel of the hide transition. Different easing functions create different animation characteristics - for example, ease-in starts slowly and accelerates, while ease-out starts quickly and decelerates. This property works together with Duration to create the desired animation experience.
Effect
Gets or sets the animation effect to be applied when hiding the toast notification.
Declaration
public ToastEffect Effect { get; set; }
Property Value
Type | Description |
---|---|
ToastEffect | A ToastEffect enumeration value that specifies the type of animation effect. The default value depends on the toast component's default settings. |
Remarks
This property determines the visual style of the hide animation. When a toast is dismissed, the specified effect controls how the toast disappears from view. The available animation effects include:
Fade
- Creates a fade-out effect where the toast gradually becomes transparentFadeZoom
- Combines fade and zoom effects for a more dynamic transitionFlipLeftDown
- Rotates the toast down and to the leftFlipLeftUp
- Rotates the toast up and to the leftFlipRightDown
- Rotates the toast down and to the rightFlipRightUp
- Rotates the toast up and to the rightFlipXDown
- Flips the toast horizontally downwardFlipXUp
- Flips the toast horizontally upwardFlipYLeft
- Flips the toast vertically to the leftFlipYRight
- Flips the toast vertically to the rightSlideBottom
- Slides the toast toward the bottom of the screenSlideLeft
- Slides the toast toward the left side of the screenSlideRight
- Slides the toast toward the right side of the screenSlideTop
- Slides the toast toward the top of the screenZoom
- Scales the toast down while hiding itNone
- No animation effect is applied
Methods
Dispose()
Dispose the unmanaged resources.
Declaration
public virtual void Dispose()
Dispose(Boolean)
Dispose the unmanaged resources.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing | Boolean value to dispose the object. |
OnParametersSetAsync()
Method invoked when the component has received parameters from its parent.
Declaration
protected override Task OnParametersSetAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A System.Threading.Tasks.Task representing any asynchronous operation. |