Events
Events empower developers to respond to key lifecycle moments of the spinner control by triggering custom actions when the spinner starts or stops its animation.
Overview
Events Table
Event Name
Delegate Type
Description
Usage Example
Code Examples and Samples
Sample Code: Attaching Event Handlers
// Create an instance of the spinner control
var spinner = new SiticoneNetFrameworkUI.SiticoneCircularSpinner();
// Attach an event handler to perform an action when the spinner starts
spinner.SpinnerStarted += (sender, e) =>
{
Console.WriteLine("Spinner animation has started.");
// Additional logic such as logging or updating the UI can be placed here.
};
// Attach an event handler to perform an action when the spinner stops
spinner.SpinnerStopped += (sender, e) =>
{
Console.WriteLine("Spinner animation has stopped.");
// Additional actions such as cleanup or state updates can be performed here.
};
// Add the spinner control to the WinForms form
this.Controls.Add(spinner);
spinner.Location = new Point(300, 300);Sample Code: Conditional UI Updates Based on Spinner Events
Key Points
Aspect
Explanation
Recommendations
Best Practices
Best Practice
Explanation
Sample Implementation
Common Pitfalls
Pitfall
Explanation
Mitigation Strategy
Usage Scenarios
Scenario
Explanation
Implementation Example
Review
Summary
Additional Considerations
Consideration
Details
Recommendations
Last updated