Class DropDownMenuAnimationSettings
Configures the animation settings for the dropdown menu in a SfDropDownButton.
Inheritance
Namespace: Syncfusion.Blazor.SplitButtons
Assembly: Syncfusion.Blazor.dll
Syntax
public class DropDownMenuAnimationSettings : OwningComponentBase
Remarks
The DropDownMenuAnimationSettings class provides options to customize the transitional effects of the dropdown menu, including animation duration, easing, and visual effects.
Examples
The following example demonstrates how to apply a zoom-in animation effect to the SfDropDownButton popup.
<SfDropDownButton Content="Profile">
<DropDownMenuItems>
<DropDownMenuItem Text="Log out"></DropDownMenuItem>
</DropDownMenuItems>
<DropDownMenuAnimationSettings Effect="DropDownMenuAnimationEffect.ZoomIn" />
</SfDropDownButton>
Constructors
DropDownMenuAnimationSettings()
Declaration
public DropDownMenuAnimationSettings()
Properties
Duration
Gets or sets the duration, in milliseconds, for the dropdown menu animation.
Declaration
public double Duration { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A |
Remarks
Use this property to adjust the speed of the animation.
- A lower value (e.g.,
200
) results in a faster animation. - A higher value (e.g.,
800
) results in a slower animation.
Easing
Gets or sets the easing effect for the dropdown menu animation.
Declaration
public string Easing { get; set; }
Property Value
Type | Description |
---|---|
System.String | A |
Remarks
Easing functions specify the rate of change of a parameter over time. Examples of supported values include:
"ease"
: A transition effect with a slow start, fast acceleration, and slow end."ease-in"
: A transition effect with a slow start."ease-out"
: A transition effect with a slow end."linear"
: A transition effect with the same speed from start to end.
Effect
Gets or sets the animation effect for the dropdown menu's appearance and disappearance.
Declaration
public DropDownMenuAnimationEffect Effect { get; set; }
Property Value
Type | Description |
---|---|
DropDownMenuAnimationEffect | A DropDownMenuAnimationEffect enum that specifies the visual effect. The default is None. |
Remarks
Available effects include:
This property allows for a more visually engaging user experience.Methods
Dispose(Boolean)
Releases the resources used by the component.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing | A |
OnInitializedAsync()
Initializes the component and updates the parent's animation settings.
Declaration
protected override Task OnInitializedAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A System.Threading.Tasks.Task that represents the asynchronous initialization process. |
OnParametersSetAsync()
Updates the parent's animation settings when parameters change.
Declaration
protected override Task OnParametersSetAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A System.Threading.Tasks.Task that represents the asynchronous parameter set process. |