Siticone Divider
The SiticoneDivider is a highly versatile layout control designed to separate content sections visually.
Far more than a simple line, it supports text embedding, gradients, animations, and over 30 unique visual styles ranging from professional (Solid, Groove) to creative (Rainbow, DNA, Heart).
Visual Styling
Customize the look and feel of the divider lines and colors.
| Property | Type | Description & Usage Example |
|---|---|---|
DividerLineStyle |
LineStyle | divider.DividerLineStyle = LineStyle.Gradient; Sets the visual pattern. Options include standard (Solid, Dashed), 3D (Groove, Ridge), Graphical (Rainbow, Glow), and Symbolic (Heart, Star, DNA). |
LineColor1 |
Color | divider.LineColor1 = Color.DodgerBlue; The primary color of the line. Used for solid styles and the start of gradients. |
LineColor2 |
Color | divider.LineColor2 = Color.Purple; The secondary color, used for gradients, dual-tone styles, or 3D effects (Groove/Ridge). |
LineThickness |
int | divider.LineThickness = 2; The thickness of the divider line in pixels. |
Orientation |
Orientation | divider.Orientation = Orientation.Vertical; Determines if the divider runs horizontally or vertically. |
Text Configuration
Controls for the text displayed within the divider gap.
| Property | Type | Description |
|---|---|---|
EnableText |
bool | Shows or hides the text element in the divider. |
Text |
string | The content text to display (e.g., "OR", "Section 1"). |
TextAlignment |
ContentAlignment | Position of the text relative to the control bounds (e.g., MiddleCenter, MiddleLeft). |
GapSize |
int | The padding (in pixels) between the text and the start of the lines. |
ForeColor |
Color | The color of the text. |
Animation & Performance
Settings for moving effects and rendering optimization.
| Property | Type | Description |
|---|---|---|
EnableAnimation |
bool | divider.EnableAnimation = true; Activates motion for supported styles (e.g., Wavy, Animated, Sparkle, DNA). Ignored for static styles like Solid. |
AnimationSpeed |
int | divider.AnimationSpeed = 30; Update interval in milliseconds. Lower values result in faster, smoother animation. |
UltraPerformance |
bool | divider.UltraPerformance = true; Disables high-quality smoothing (Antialiasing) and complex styles to maximize rendering speed. Useful for lists or complex forms. |
Events
Events to hook into property changes or customize rendering.
// Cancel a style change if needed
divider.LineStyleChanging += (sender, e) =>
{
if (e.NewValue == LineStyle.Comic)
{
e.Cancel = true; // Prevent setting 'Comic' style
}
};
// Advanced: Custom drawing or measurement before standard paint
divider.BeforeDraw += (sender, e) =>
{
Console.WriteLine($"Text Bounds: {e.TextBounds}");
};
Enumerations
public enum LineStyle
{
// Standard
Solid, Dashed, Dotted, Double,
// 3D / Bevel
Groove, Ridge, Inset, Outset,
// Artistic
Wavy, ZigZag, Gradient, Rainbow, Glow, Fade,
// Symbolic
Arrow, Heart, Star, Music, Code, Binary,
// Special / Animated
DNA, Pulse, Flame, Electric, Cosmic, Bubble, MorseCode
}
Usage Examples
Example 1: Login Form Separator
A standard "OR" separator used between login inputs and social login buttons.
private void SetupLoginDivider()
{
siticoneDivider1.Text = "OR";
siticoneDivider1.EnableText = true;
siticoneDivider1.DividerLineStyle = SiticoneDivider.LineStyle.Solid;
siticoneDivider1.LineColor1 = Color.LightGray;
siticoneDivider1.ForeColor = Color.Gray;
siticoneDivider1.GapSize = 15;
}
Example 2: Vertical Toolbar Splitter
A vertical gradient line to separate groups of icons in a toolbar.
private void SetupToolbarSplitter()
{
dividerTools.Orientation = Orientation.Vertical;
dividerTools.EnableText = false; // No text needed
dividerTools.DividerLineStyle = SiticoneDivider.LineStyle.Gradient;
// Create a fading effect
dividerTools.LineColor1 = Color.Transparent;
dividerTools.LineColor2 = Color.White;
dividerTools.LineThickness = 2;
dividerTools.Size = new Size(10, 40);
}
Example 3: Animated Activity Indicator
Using the "DNA" style with animation enabled to create a unique progress indicator or loading separator.
private void StartLoadingAnimation()
{
dividerStatus.DividerLineStyle = SiticoneDivider.LineStyle.DNA;
dividerStatus.LineColor1 = Color.DeepSkyBlue;
dividerStatus.LineThickness = 2;
dividerStatus.Text = "PROCESSING";
dividerStatus.ForeColor = Color.DeepSkyBlue;
// Enable motion
dividerStatus.EnableAnimation = true;
dividerStatus.AnimationSpeed = 30; // Fast update
}
Example 4: Code Section Header
A stylistic choice for developer tools or code editors, using the "Code" symbol style.
private void SetupCodeHeader()
{
dividerCode.Text = "SOURCE";
dividerCode.DividerLineStyle = SiticoneDivider.LineStyle.Code; // Renders <> symbols
dividerCode.LineColor1 = Color.LimeGreen;
dividerCode.LineThickness = 2;
dividerCode.BackColor = Color.FromArgb(30, 30, 30); // Dark background
dividerCode.ForeColor = Color.LimeGreen;
}
Designer Smart Tags
The control integrates with Visual Studio's Smart Tag feature to provide quick access to common presets and actions.