Class ProgressButtonEvents
Configures the event handlers for the SfProgressButton component.
Inheritance
Namespace: Syncfusion.Blazor.SplitButtons
Assembly: Syncfusion.Blazor.dll
Syntax
public class ProgressButtonEvents : ComponentBase
Remarks
This component allows you to define callbacks for various events such as the start, end, and progress of the button's operation.
Constructors
ProgressButtonEvents()
Declaration
public ProgressButtonEvents()
Properties
Created
Gets or sets an event callback that is raised once the SfProgressButton component has been rendered.
Declaration
public EventCallback<object> Created { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<System.Object> | An Microsoft.AspNetCore.Components.EventCallback that is invoked after the component is rendered. |
Remarks
This event is useful for performing actions after the button is fully initialized and displayed.
Examples
<SfProgressButton>
<ProgressButtonEvents Created="@Created"></ProgressButtonEvents>
</SfProgressButton >
@code {
private void Created() {
// Write your code here.
}
}
OnBegin
Gets or sets an event callback that is triggered when the progress begins in the SfProgressButton.
Declaration
public EventCallback<ProgressEventArgs> OnBegin { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<ProgressEventArgs> | An Microsoft.AspNetCore.Components.EventCallback<> that is invoked when the progress starts. The callback receives ProgressEventArgs as its argument. |
Remarks
This event is fired when the button's action is initiated and the progress indicator becomes active.
Examples
<SfProgressButton>
<ProgressButtonEvents OnBegin="@OnProgressBegin"></ProgressButtonEvents>
</SfProgressButton>
@code {
private void OnProgressBegin(ProgressEventArgs args) {
// Add your code here to handle the begin event.
}
}
OnEnd
Gets or sets an event callback that is triggered when the progress is completed in the SfProgressButton.
Declaration
public EventCallback<ProgressEventArgs> OnEnd { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<ProgressEventArgs> | An Microsoft.AspNetCore.Components.EventCallback<> that is invoked when the progress successfully completes. The callback receives ProgressEventArgs as its argument. |
Remarks
This event indicates that the operation associated with the button has finished successfully.
Examples
<SfProgressButton>
<ProgressButtonEvents OnEnd="@OnProgressEnd"></ProgressButtonEvents>
</SfProgressButton>
@code {
private void OnProgressEnd(ProgressEventArgs args) {
// Add your code here to handle the end event.
}
}
OnFailure
Gets or sets an event callback that is triggered when the progress fails or is interrupted in the SfProgressButton.
Declaration
public EventCallback<Exception> OnFailure { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<System.Exception> | An Microsoft.AspNetCore.Components.EventCallback<> that is invoked when an operation fails. The callback receives an System.Exception as its argument. |
Remarks
This event allows you to handle any exceptions or failures that occur during the button's operation.
Examples
<SfProgressButton>
<ProgressButtonEvents OnFailure="@OnProgressFailure"></ProgressButtonEvents>
</SfProgressButton>
@code {
private void OnProgressFailure(Exception ex) {
// Add your code here to handle the failure.
}
}
Progressing
Gets or sets an event callback that is triggered at specific intervals while the SfProgressButton is in a progressing state.
Declaration
public EventCallback<ProgressEventArgs> Progressing { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<ProgressEventArgs> | An Microsoft.AspNetCore.Components.EventCallback<> that is invoked periodically during progress. The callback receives ProgressEventArgs as its argument. |
Remarks
This event can be used to monitor the progress of an ongoing operation and provide real-time feedback to the user.
Examples
<SfProgressButton>
<ProgressButtonEvents Progressing="@OnProgressing"></ProgressButtonEvents>
</SfProgressButton>
@code {
private void OnProgressing(ProgressEventArgs args) {
// Add your code here to handle the progressing event.
}
}
Methods
OnInitializedAsync()
Initializes the component and attaches the event delegates to the parent SfProgressButton.
Declaration
protected override Task OnInitializedAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A System.Threading.Tasks.Task that represents the asynchronous initialization process. |
Remarks
This method is part of the Blazor component lifecycle and is invoked when the component is first initialized.