Visual Appearance
Visual Appearance allows developers to customize the button’s background rendering, enabling a choice between solid colors and gradient fills with configurable colors and gradient direction.
Overview
Properties Table
Property
Type
Default Value
Description
Code Examples
Basic Integration
using System;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Windows.Forms;
using SiticoneNetFrameworkUI;
public class VisualAppearanceDemoForm : Form
{
public VisualAppearanceDemoForm()
{
// Instantiate the SiticoneDashboardButton control
SiticoneDashboardButton dashboardButton = new SiticoneDashboardButton
{
Text = "Gradient Button",
Size = new Size(250, 45),
Location = new Point(50, 50),
// Enable the gradient background
UseGradientBackground = true,
// Set the start and end colors of the gradient
GradientStartColor = Color.FromArgb(60, 120, 200),
GradientEndColor = Color.FromArgb(30, 60, 150),
// Set the gradient direction (Horizontal, Vertical, etc.)
GradientMode = LinearGradientMode.Horizontal
};
// Add the button to the form
Controls.Add(dashboardButton);
}
[STAThread]
public static void Main()
{
Application.EnableVisualStyles();
Application.Run(new VisualAppearanceDemoForm());
}
}Advanced Customization
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