Class BeforeCloseEventArgs
Provides arguments for the OnClose event, which is triggered before the dialog closes.
Inheritance
Namespace: Syncfusion.Blazor.Popups
Assembly: Syncfusion.Blazor.dll
Syntax
public class BeforeCloseEventArgs : Object
Remarks
This event can be used to perform actions or validations before the dialog is closed. The closing process can be canceled by setting the Cancel property to true
.
Constructors
BeforeCloseEventArgs()
Declaration
public BeforeCloseEventArgs()
Properties
Cancel
Gets or sets a value indicating whether the closing of the dialog should be canceled.
Declaration
public bool Cancel { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | A |
Remarks
Set this property to true
to prevent the dialog from closing.
ClosedBy
Gets a value indicating how the dialog was requested to be closed.
Declaration
public string ClosedBy { get; set; }
Property Value
Type | Description |
---|---|
System.String | A |
Remarks
This property helps determine whether the dialog was closed via the close icon, the Escape key, or another user-defined action.
Event
Gets the underlying event arguments that triggered the close action.
Declaration
public EventArgs Event { get; set; }
Property Value
Type | Description |
---|---|
System.EventArgs | An System.EventArgs object. |
Remarks
This can be a Microsoft.AspNetCore.Components.Web.MouseEventArgs for a click or a Microsoft.AspNetCore.Components.Web.KeyboardEventArgs for a key press.
IsInteracted
Gets a value indicating whether the dialog was closed through user interaction.
Declaration
public bool IsInteracted { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Remarks
This allows distinguishing between programmatic closing and user-initiated actions.