Siticone Advanced Panel
The SiticoneAdvancedPanel is a highly versatile container control designed for modern UI development.
It extends the standard panel with powerful styling capabilities including complex gradients, shadows,
advanced border patterns, glassmorphism support, and entrance animations.
Core Appearance
Control the fundamental geometry of the panel, including independent corner radii and basic border settings.
| Property | Type | Description & Usage Example |
|---|---|---|
BorderColor |
Color | pnl.BorderColor = Color.FromArgb(60, 60, 60); The color of the primary border stroke. |
BorderWidth |
float | pnl.BorderWidth = 1.5f; Thickness of the border in pixels. Supports float values for fine-tuning. |
TopLeftRadius |
int | pnl.TopLeftRadius = 20; Radius for the top-left corner. Independent control allows for asymmetric shapes. |
TopRightRadius |
int | pnl.TopRightRadius = 20; |
BottomLeftRadius |
int | pnl.BottomLeftRadius = 5; |
BottomRightRadius |
int | pnl.BottomRightRadius = 5; |
Gradients & Colors
Apply rich linear or radial gradients to the panel background, replacing the standard solid color.
| Property | Type | Description & Usage Example |
|---|---|---|
EnableGradient |
bool | pnl.EnableGradient = true; Master switch to enable gradient rendering. |
GradientStartColor |
Color | pnl.GradientStartColor = Color.Blue; The starting color of the gradient transition. |
GradientEndColor |
Color | pnl.GradientEndColor = Color.Magenta; The ending color of the gradient transition. |
GradientAngle |
float | pnl.GradientAngle = 45f; The angle in degrees for Linear gradients (0 = Horizontal, 90 = Vertical). |
GradientType |
GradientTypeEx | pnl.GradientType = GradientTypeEx.Radial; Selects between Linear or Radial gradient styles. |
RadialGradientCenter |
PointF | pnl.RadialGradientCenter = new PointF(0.5f, 0.5f); Center point for radial gradients (0.0 to 1.0 range). |
RadialGradientRadius |
float | pnl.RadialGradientRadius = 1.2f; Size multiplier for radial gradients. |
Shadows & Depth
Create depth and elevation with drop shadows (outer) and inset shadows (inner).
| Property | Type | Description & Usage Example |
|---|---|---|
EnableShadow |
bool | pnl.EnableShadow = true; Renders a drop shadow behind the panel. |
ShadowColor |
Color | pnl.ShadowColor = Color.Black; |
ShadowOpacity |
float | pnl.ShadowOpacity = 0.4f; Alpha transparency of the shadow (0.0 to 1.0). |
ShadowBlur |
int | pnl.ShadowBlur = 15; Softness radius of the shadow edge. |
ShadowOffset |
Point | pnl.ShadowOffset = new Point(5, 5); Displacement of the shadow relative to the panel. |
EnableInnerShadow |
bool | pnl.EnableInnerShadow = true; Renders a shadow inside the panel borders (inset effect). |
InnerShadowDepth |
int | pnl.InnerShadowDepth = 3; Thickness of the inner shadow. |
Border Systems
Advanced border styling including dashed patterns, double borders, and neon glow effects.
| Property | Type | Description & Usage Example |
|---|---|---|
AdvancedBorderStyle |
BorderStyleEx | pnl.AdvancedBorderStyle = BorderStyleEx.Dash; Options: Solid, Dash, Dot, DashDot, DashDotDot, Custom. |
BorderDashPattern |
float[] | pnl.BorderDashPattern = new float[] { 5, 2, 1, 2 }; Custom dash/gap array. Active when style is Custom. |
EnableDoubleBorder |
bool | pnl.EnableDoubleBorder = true; Draws a second border inside the primary one. |
SecondaryBorderColor |
Color | pnl.SecondaryBorderColor = Color.White; |
EnableBorderGlow |
bool | pnl.EnableBorderGlow = true; Applies a neon-like outer glow to the border path. |
BorderGlowColor |
Color | pnl.BorderGlowColor = Color.Cyan; |
Motion & Animation
Built-in entrance animations to make UI elements appear smoothly without complex code.
| Property | Type | Description & Usage Example |
|---|---|---|
EnableAnimation |
bool | pnl.EnableAnimation = true; Triggers the animation when the control becomes visible. |
AnimationType |
AnimationTypeEx | pnl.AnimationType = AnimationTypeEx.SlideAndFade; Options: Fade, Slide, Scale, SlideAndFade, ScaleAndFade. |
AnimationDuration |
int | pnl.AnimationDuration = 800; Duration of the entrance effect in milliseconds. |
EasingType |
EasingTypeEx | pnl.EasingType = EasingTypeEx.EaseOutBack; Controls the acceleration curve (e.g., Bounce, Elastic, Smooth). |
SlideDirection |
Point | pnl.SlideDirection = new Point(0, -50); Offset for Slide animations (X, Y). |
State Management
Configure how the panel reacts to user interaction (Hover, Click/Active, Disabled).
| Property | Type | Description & Usage Example |
|---|---|---|
EnableStateStyles |
bool | pnl.EnableStateStyles = true; Enables automatic color changes on Hover and Click events. |
HoverBackColor |
Color | pnl.HoverBackColor = Color.FromArgb(50, 50, 50); Background color when mouse enters the panel. |
ActiveBackColor |
Color | pnl.ActiveBackColor = Color.FromArgb(70, 70, 70); Background color when the panel is clicked (MouseDown). |
HoverBorderColor |
Color | pnl.HoverBorderColor = Color.White; |
Background & Images
Enhanced background image handling with overlays, opacity control, and sizing modes.
| Property | Type | Description & Usage Example |
|---|---|---|
EnableBackgroundImage |
bool | pnl.EnableBackgroundImage = true; |
BackgroundImageCustom |
Image | pnl.BackgroundImageCustom = Resources.Texture; The image to render. (Uses custom property to avoid conflict with base Panel). |
BackgroundImageOpacity |
float | pnl.BackgroundImageOpacity = 0.5f; Transparency of the image (0.0 to 1.0). |
BackgroundImageSizeMode |
ImageSizeModeEx | pnl.BackgroundImageSizeMode = ImageSizeModeEx.Cover; Normal, Stretch, Center, Zoom, or Tile. |
BackgroundOverlayColor |
Color | pnl.BackgroundOverlayColor = Color.FromArgb(100, 0, 0, 0); A color layer drawn on top of the background image (useful for text readability). |
Layout & Content
Utilities for managing child controls and internal spacing.
| Property | Type | Description & Usage Example |
|---|---|---|
EnableSmartPadding |
bool | pnl.EnableSmartPadding = true; Automatically calculates padding to prevent content from clipping into rounded corners. |
CornerPadding |
Padding | pnl.CornerPadding = new Padding(5); Additional padding added to the Smart Padding calculation. |
Enumerations
Enumerations specific to the SiticoneAdvancedPanel configuration.
public enum AnimationTypeEx
{
None,
Fade,
Slide,
Scale,
SlideAndFade, // Combines opacity fade with movement
ScaleAndFade // Combines opacity fade with size growth
}
public enum GradientTypeEx
{
Linear, // Direction defined by GradientAngle
Radial // Circular gradient radiating from RadialGradientCenter
}
Detailed Usage Examples
Example 1: Glassmorphism Card Effect
Creates a modern "frosted glass" look using semi-transparent background, white borders, and soft shadows.
private SiticoneAdvancedPanel CreateGlassPanel()
{
var pnl = new SiticoneAdvancedPanel
{
Size = new Size(300, 180),
// Semi-transparent background (White with low alpha)
BackColor = Color.FromArgb(40, 255, 255, 255),
// Rounded Corners
TopLeftRadius = 20,
TopRightRadius = 20,
BottomLeftRadius = 20,
BottomRightRadius = 20,
// Subtle white border
BorderColor = Color.FromArgb(100, 255, 255, 255),
BorderWidth = 1.5f,
// Soft Shadow for depth
EnableShadow = true,
ShadowColor = Color.Black,
ShadowOpacity = 0.2f,
ShadowBlur = 20,
// Interaction
EnableStateStyles = true,
HoverBorderColor = Color.White // Brighten border on hover
};
return pnl;
}
Example 2: Animated Sidebar Menu
A panel configured as a sidebar that slides in from the left with a fade effect when it becomes visible.
private void ConfigureSidebar(SiticoneAdvancedPanel sidebar)
{
// Appearance
sidebar.Dock = DockStyle.Left;
sidebar.Width = 250;
sidebar.BackColor = Color.FromArgb(30, 30, 35);
sidebar.TopRightRadius = 0; // Flush with edge
sidebar.BottomRightRadius = 0;
// Entrance Animation Configuration
sidebar.EnableAnimation = true;
sidebar.AnimationType = AnimationTypeEx.SlideAndFade;
sidebar.AnimationDuration = 600;
// Slide from left (negative X)
sidebar.SlideDirection = new Point(-50, 0);
sidebar.EasingType = EasingTypeEx.EaseOutCubic;
// Gradient Background (Vertical Dark)
sidebar.EnableGradient = true;
sidebar.GradientStartColor = Color.FromArgb(40, 40, 50);
sidebar.GradientEndColor = Color.FromArgb(20, 20, 25);
sidebar.GradientAngle = 90f;
}
Example 3: "Cyberpunk" Style Border
Demonstrates advanced border capabilities using glowing effects, double borders, and custom colors.
var neonPanel = new SiticoneAdvancedPanel
{
Size = new Size(200, 100),
BackColor = Color.Black,
// Primary Pink Border
BorderColor = Color.DeepPink,
BorderWidth = 2f,
// Glow Effect
EnableBorderGlow = true,
BorderGlowColor = Color.Magenta,
BorderGlowSize = 8f,
// Inner Cyan Border
EnableDoubleBorder = true,
SecondaryBorderColor = Color.Cyan,
DoubleBorderSpacing = 4f,
// Dashed Style
AdvancedBorderStyle = BorderStyleEx.DashDot
};