Search results

Animation

The Dialog can be animated during the open and close actions. Also, users can customize animation’s Delay, Duration and Effect by using the DialogAnimationSettings property.

delay The Dialog animation will start with the mentioned delay
duration Specifies the animation duration to complete with one animation cycle
effect Specifies the animation effects of Dialog open and close actions effect.

List of supported animation effects:
'Fade' | 'FadeZoom' | 'FlipLeftDown' | 'FlipLeftUp' | 'FlipRightDown' | 'FlipRightUp' | 'FlipXDown' | 'FlipXUp' | 'FlipYLeft' | 'FlipYRight' | 'SlideBottom' | 'SlideLeft' | 'SlideRight' | 'SlideTop' | 'Zoom'| 'None'

If the user sets 'Fade' effect, then the Dialog will open with 'FadeIn' effect and close with 'FadeOut' effect

In the following sample, Zoom effect is enabled. So, The Dialog will open with ZoomIn and close with ZoomOut effects.

@using Syncfusion.EJ2.Blazor
@using Syncfusion.EJ2.Blazor.Popups
@using Syncfusion.EJ2.Blazor.Buttons

<EjsButton @onclick="@OnBtnClick">Open</EjsButton>
<EjsDialog @ref="DialogObj" Width="500px" ShowCloseIcon="true">
    <DialogTemplates>
        <Header> Dialog </Header>
        <Content> Dialog enabled with Zoom effect</Content>
    </DialogTemplates>
    <DialogAnimationSettings Effect="@Effects" Duration=400></DialogAnimationSettings>
    <DialogButtons>
        <DialogButton ButtonModel="@DialogBtn" OnClick="@OnClick" />
    </DialogButtons>
</EjsDialog>

@code {
    EjsDialog DialogObj;

    public DialogEffect Effects = DialogEffect.Zoom;
    private void OnClick(Object args)
    {
        this.DialogObj.Hide();
    }
    private void OnBtnClick()
    {
        this.DialogObj.Show();
    }

    public Syncfusion.EJ2.Blazor.Buttons.ButtonModel DialogBtn = new Syncfusion.EJ2.Blazor.Buttons.ButtonModel { Content="Hide", IsPrimary = true };
}