menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class DialogEvents - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class DialogEvents

    A class used for configuring the SfDialog component events.

    Inheritance
    System.Object
    DialogEvents
    Namespace: Syncfusion.Blazor.Popups
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class DialogEvents : OwningComponentBase

    Constructors

    DialogEvents()

    Declaration
    public DialogEvents()

    Properties

    Closed

    Gets or sets the event callback that will be invoked when the SfDialog is closed.

    Declaration
    public EventCallback<CloseEventArgs> Closed { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<CloseEventArgs>

    An event callback function.

    Examples
    @using Syncfusion.Blazor.Popups
    <SfDialog Width="500px" @bind-Visible="Visibility">
      <DialogTemplates>
        <Content>
            <p>
               Dialog content
              </p>
          </Content>
      </DialogTemplates>
      <DialogEvents Closed="OnClosedHandler"></DialogEvents>
      <DialogButtons>
          <DialogButton Content="Ok" OnClick="@OnBtnClick" />
     </DialogButtons>
      </SfDialog>
     @code {
      private bool Visibility { get; set; } = true;
      private void OnClosedHandler(CloseEventArgs args)
      {
         //Write your code here.
      }
      private void OnBtnClick()
      {
       this.Visibility = false;
      }
     }

    Created

    Gets or sets the event callback that will be invoked when the SfDialog rendering is completed.

    Declaration
    public EventCallback<object> Created { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<System.Object>

    An event callback function.

    Destroyed

    Gets or sets the event callback that will be invoked when the SfDialog disposing is completed.

    Declaration
    public EventCallback<object> Destroyed { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<System.Object>

    An event callback function.

    OnClose

    Gets or sets the event callback that will be invoked when the SfDialog is closed.

    Declaration
    public EventCallback<BeforeCloseEventArgs> OnClose { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<BeforeCloseEventArgs>

    An event callback function.

    Examples
    @using Syncfusion.Blazor.Popups
    <SfDialog Width="500px" @bind-Visible="Visibility">
      <DialogTemplates>
        <Content>
            <p>
               Dialog content
              </p>
          </Content>
      </DialogTemplates>
      <DialogEvents OnClose="OnCloseHandler"></DialogEvents>
      <DialogButtons>
          <DialogButton Content="Ok" OnClick="@OnBtnClick" />
     </DialogButtons>
      </SfDialog>
     @code {
      private bool Visibility { get; set; } = true;
      private void OnCloseHandler(BeforeCloseEventArgs args)
      {
         //Write your code here.
      }
      private void OnBtnClick()
      {
       this.Visibility = false;
      }
     }

    OnDrag

    Gets or sets the event callback that will be invoked when the SfDialog is dragging.

    Declaration
    public EventCallback<DragEventArgs> OnDrag { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<DragEventArgs>

    An event callback function.

    Examples
    @using Syncfusion.Blazor.Popups
    <SfDialog Width="500px" @bind-Visible="Visibility">
      <DialogTemplates>
        <Content>
            <p>
               Dialog content
              </p>
          </Content>
      </DialogTemplates>
      <DialogEvents OnDrag="OnDragHandler"></DialogEvents>
      </SfDialog>
     @code {
      private bool Visibility { get; set; } = true;
      private void OnDragHandler(DragEventArgs args)
      {
         //Write your code here.
      }
     }

    OnDragStart

    Gets or sets the event callback that will be invoked when the drag of the SfDialog is initiated.

    Declaration
    public EventCallback<DragStartEventArgs> OnDragStart { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<DragStartEventArgs>

    An event callback function.

    Examples
    @using Syncfusion.Blazor.Popups
    <SfDialog Width="500px" @bind-Visible="Visibility">
      <DialogTemplates>
        <Content>
            <p>
               Dialog content
              </p>
          </Content>
      </DialogTemplates>
      <DialogEvents OnDragStart="OnDragStartHandler"></DialogEvents>
      </SfDialog>
     @code {
      private bool Visibility { get; set; } = true;
      private void OnDragStartHandler(DragEventArgs args)
      {
         //Write your code here.
      }
     }

    OnDragStop

    Gets or sets the event callback that will be invoked when the drag of the SfDialog is stopped.

    Declaration
    public EventCallback<DragStopEventArgs> OnDragStop { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<DragStopEventArgs>

    An event callback function.

    Examples
    @using Syncfusion.Blazor.Popups
    <SfDialog Width="500px" @bind-Visible="Visibility">
      <DialogTemplates>
        <Content>
            <p>
               Dialog content
              </p>
          </Content>
      </DialogTemplates>
      <DialogEvents OnDragStop="OnDragStopHandler"></DialogEvents>
      </SfDialog>
     @code {
      private bool Visibility { get; set; } = true;
      private void OnDragStopHandler(DragStopEventArgs args)
      {
         //Write your code here.
      }
     }

    OnOpen

    Gets or sets the event callback that will be invoked when the SfDialog is opening.

    Declaration
    public EventCallback<BeforeOpenEventArgs> OnOpen { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<BeforeOpenEventArgs>

    An event callback function.

    Examples
    @using Syncfusion.Blazor.Popups
    <SfDialog Width="500px" @bind-Visible="Visibility">
      <DialogTemplates>
        <Content>
            <p>
               Dialog content
              </p>
          </Content>
      </DialogTemplates>
      <DialogEvents OnOpen="OnOpenHandler"></DialogEvents>
      </SfDialog>
     @code {
      private bool Visibility { get; set; } = true;
      private void OnOpenHandler(BeforeOpenEventArgs args)
      {
         //Write your code here.
      }
     }

    OnOverlayModalClick

    Gets or sets the event callback that will be invoked when the SfDialog modal overlay is clicked.

    Declaration
    public EventCallback<OverlayModalClickEventArgs> OnOverlayModalClick { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<OverlayModalClickEventArgs>

    An event callback function.

    Examples
    @using Syncfusion.Blazor.Popups
    <SfDialog Width="500px" @bind-Visible="Visibility" IsModal="true">
      <DialogTemplates>
        <Content>
            <p>
               Dialog content
              </p>
          </Content>
      </DialogTemplates>
      <DialogEvents OnOverlayModalClick="OnOverlayModalClickHandler"></DialogEvents>
      </SfDialog>
     @code {
      private bool Visibility { get; set; } = true;
      private void OnOverlayModalClickHandler(OverlayModalClickEventArgs args)
      {
         //Write your code here.
      }
     }

    OnResizeStart

    Gets or sets the event callback that will be invoked when resize of the SfDialog is initiated.

    Declaration
    public EventCallback<MouseEventArgs> OnResizeStart { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<Microsoft.AspNetCore.Components.Web.MouseEventArgs>

    An event callback function.

    Examples
    @using Syncfusion.Blazor.Popups
    <SfDialog Width="500px" @bind-Visible="Visibility">
      <DialogTemplates>
        <Content>
            <p>
               Dialog content
              </p>
          </Content>
      </DialogTemplates>
      <DialogEvents OnResizeStart="OnOnResizeStartHandler"></DialogEvents>
      </SfDialog>
     @code {
      private bool Visibility { get; set; } = true;
      private void OnOnResizeStartHandler(MouseEventArgs args)
      {
         //Write your code here.
      }
     }

    OnResizeStop

    Gets or sets the event callback that will be invoked when resize of the SfDialog is stopped.

    Declaration
    public EventCallback<MouseEventArgs> OnResizeStop { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<Microsoft.AspNetCore.Components.Web.MouseEventArgs>

    An event callback function.

    Examples
    @using Syncfusion.Blazor.Popups
    <SfDialog Width="500px" @bind-Visible="Visibility">
      <DialogTemplates>
        <Content>
            <p>
               Dialog content
              </p>
          </Content>
      </DialogTemplates>
      <DialogEvents OnResizeStop="OnResizeStopHandler"></DialogEvents>
      </SfDialog>
     @code {
      private bool Visibility { get; set; } = true;
      private void OnResizeStopHandler(MouseEventArgs args)
      {
         //Write your code here.
      }
     }

    Opened

    Event triggers when a dialog is opened.

    Declaration
    public EventCallback<OpenEventArgs> Opened { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<OpenEventArgs>

    An event callback function.

    Resizing

    Gets or sets the event callback that will be invoked when the SfDialog is resizing.

    Declaration
    public EventCallback<MouseEventArgs> Resizing { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<Microsoft.AspNetCore.Components.Web.MouseEventArgs>

    An event callback function.

    Examples
    @using Syncfusion.Blazor.Popups
    <SfDialog Width="500px" @bind-Visible="Visibility">
      <DialogTemplates>
        <Content>
            <p>
               Dialog content
              </p>
          </Content>
      </DialogTemplates>
      <DialogEvents Resizing="OnResizingHandler"></DialogEvents>
      </SfDialog>
     @code {
      private bool Visibility { get; set; } = true;
      private void OnResizingHandler(MouseEventArgs args)
      {
         //Write your code here.
      }
     }

    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.

    OnInitializedAsync()

    Method invoked when the component is ready to start.

    Declaration
    protected override Task OnInitializedAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    A System.Threading.Tasks.Task representing any asynchronous operation.

    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved