User Interaction Events
User Interaction Events enable developers to respond to a variety of user actions on the SiticoneDashboardButton control, enhancing interactivity and feedback through custom event handling.
Overview
Events Table
Event Name
Delegate Type
Description
Code Examples
Basic Event Handling
using System;
using System.Drawing;
using System.Windows.Forms;
using SiticoneNetFrameworkUI;
public class UserInteractionDemoForm : Form
{
public UserInteractionDemoForm()
{
// Create an instance of the dashboard button
SiticoneDashboardButton dashboardButton = new SiticoneDashboardButton
{
Text = "Interact",
Size = new Size(250, 45),
Location = new Point(50, 50),
ShowBadge = true,
BadgeCount = 3
};
// Subscribe to user interaction events
dashboardButton.BadgeClicked += DashboardButton_BadgeClicked;
dashboardButton.LongPressed += DashboardButton_LongPressed;
dashboardButton.DoubleTapped += DashboardButton_DoubleTapped;
// Add the button to the form
Controls.Add(dashboardButton);
}
private void DashboardButton_BadgeClicked(object sender, EventArgs e)
{
MessageBox.Show("Badge clicked!");
}
private void DashboardButton_LongPressed(object sender, EventArgs e)
{
MessageBox.Show("Button long pressed!");
}
private void DashboardButton_DoubleTapped(object sender, EventArgs e)
{
MessageBox.Show("Button double tapped!");
}
[STAThread]
public static void Main()
{
Application.EnableVisualStyles();
Application.Run(new UserInteractionDemoForm());
}
}Advanced Badge Update Handling
Key Points
Aspect
Details
Best Practices
Practice
Recommendation
Common Pitfalls
Pitfall
How to Avoid
Usage Scenarios
Scenario
Example Use Case
Review
Summary
Additional Resources
Resource
Description
Link/Reference
Last updated