Siticone Logo
Siticone UI
DOCS
v2025.12.15
Docs Signature Pad

Siticone Signature Pad

The SiticoneSignaturePad is a sophisticated control designed for capturing, analyzing, and replaying digital signatures. It features pressure-sensitive stroke simulation, velocity-based line width adjustment, and advanced stroke smoothing algorithms. Built-in analytics can track speed, duration, and stroke count, making it suitable for both aesthetic signature capture and biometric verification tasks.

Appearance & Styling

Customize the visual foundation of the signature area and the ink characteristics.

Property Type Description & Usage Example
BackgroundColor Color pad.BackgroundColor = Color.WhiteSmoke; The background color of the drawing canvas.
StrokeColor Color pad.StrokeColor = Color.DarkBlue; The color of the digital ink.
BaseStrokeWidth float pad.BaseStrokeWidth = 3.5f; The foundation thickness for strokes before dynamic adjustments (pressure/velocity) are applied.
MinStrokeWidth float pad.MinStrokeWidth = 1.0f; The absolute minimum thickness a stroke can reach during fast movement or light pressure.
MaxStrokeWidth float pad.MaxStrokeWidth = 6.0f; The absolute maximum thickness a stroke can reach.
BackgroundTemplate Image pad.BackgroundTemplate = Resources.SignHereWatermark; An image drawn behind the strokes, useful for "Sign Here" indicators or lines.

Stroke Dynamics & Simulation

Configure the physics of the digital pen. These settings control how the line reacts to the user's input speed and simulated pressure, creating a natural, calligraphy-like feel.

Property Type Description & Usage Example
EnableVelocitySensitivity bool pad.EnableVelocitySensitivity = true; If true, faster strokes will appear thinner, simulating a real pen.
VelocityFactor float pad.VelocityFactor = 0.5f; Controls how drastically speed affects stroke width. Higher values make lines thin out faster.
EnablePressureSensitivity bool pad.EnablePressureSensitivity = true; Enables width variation based on input pressure (if supported by hardware) or simulated pressure.
AutoSmoothStrokes bool pad.AutoSmoothStrokes = true; Applies an averaging algorithm to input points to reduce jitter and create fluid curves.
SmoothingFactor int pad.SmoothingFactor = 5; The intensity of the smoothing algorithm. Higher values result in smoother, simpler lines.

Visual Guides & Alignment

Help users keep their signatures straight or aligned using the built-in grid system.

Property Type Description & Usage Example
ShowGrid bool pad.ShowGrid = true; Toggles the display of background grid lines.
GridColor Color pad.GridColor = Color.LightGray; The color of the grid lines.
GridSize int pad.GridSize = 20; The spacing (in pixels) between grid lines.
EnableSnapping bool pad.EnableSnapping = false; If enabled, drawing points snap to the nearest grid intersection. Useful for technical drawing rather than signatures.

Animation & Features

Property Type Description & Usage Example
EnableUndo bool pad.EnableUndo = true; Allows removing the last drawn stroke. Accessible via code or context menu.
EnableReplay bool pad.EnableReplay = true; Enables the ability to animate the signature drawing process stroke by stroke.
ReplaySpeed int pad.ReplaySpeed = 2; Multiplier for replay speed. Higher values result in faster animation.
StrokeHistory int pad.StrokeHistory = 50; The maximum number of strokes stored in memory for undo operations.

Public Methods

ClearSignature()
// Erases all strokes from the pad and resets the analytics.
signaturePad1.ClearSignature();
SaveSignature(string path, ImageFormat format)
// Saves the current signature to a file with the specified format.
signaturePad1.SaveSignature("signature.png", ImageFormat.Png);
GetSignatureAnalytics()
// Retrieves statistical data about the signature (speed, duration, pressure).
var stats = signaturePad1.GetSignatureAnalytics();
Console.WriteLine($"Total Duration: {stats.TotalDuration.TotalSeconds}s");
StartReplay() & StopReplay()
// Starts the visual animation of the signature being drawn.
signaturePad1.StartReplay();

// Stops the animation immediately.
signaturePad1.StopReplay();

Events

Event Handling
// 1. Stroke Completed
// Fires whenever the user lifts the pen/mouse after drawing a line.
pad.StrokeCompleted += (s, e) => 
{
                Console.WriteLine($"Stroke recorded with {e.Points.Count} points.");
    btnSave.Enabled = true;
};

// 2. Analytics Updated
// Fires when analytics are requested or calculated.
pad.AnalyticsUpdated += (s, analytics) => 
{
    lblSpeed.Text = $"Avg Speed: {analytics.AverageStrokeSpeed:F2} px/ms";
};

// 3. Signature Cleared
// Fires when the clear method is called or context menu is used.
pad.SignatureCleared += (s, e) => 
{
    btnSave.Enabled = false;
    lblStatus.Text = "Ready";
};

// 4. Replay Events
pad.ReplayStarted += (s, e) => lblStatus.Text = "Replaying...";
pad.ReplayCompleted += (s, e) => lblStatus.Text = "Replay Finished";

Designer Support

The control includes a Smart Tag panel in Visual Studio for quick configuration.

Category Features
Preset Styles Instantly apply complex configurations:
  • Professional Contract: White background, dark blue ink, subtle grid.
  • Calligraphy Pen: High velocity sensitivity, thick strokes, flat caps.
  • Fountain Pen: Crisp lines, high smoothing, navy ink.
  • Red Ink: Correction style with red color.
  • Highlighter: Thick, translucent yellow strokes.
Actions Clear Signature, Reset Control, Copy/Paste Settings.

Detailed Usage Examples

Example 1: Standard Signature Capture

A basic setup for capturing a user's signature on a form.

C# - Basic Capture
private SiticoneSignaturePad CreateSignaturePad()
{
                var pad = new SiticoneSignaturePad
    {
        Size = new Size(400, 200),
        BackgroundColor = Color.WhiteSmoke,
        StrokeColor = Color.Black,
        
                // Stroke Dynamics
        BaseStrokeWidth = 2.5f,
        EnableVelocitySensitivity = true,
        VelocityFactor = 0.5f,
        SmoothingFactor = 5,
        
                // Features
        EnableUndo = true,
        EnableReplay = true
    };

                return pad;
}

Example 2: Biometric Data Analysis

Demonstrates how to extract analytics from the signature for verification or storage.

C# - Analytics
private void AnalyzeSignature(SiticoneSignaturePad pad)
{
                if (!pad.HasSignature) return;

                var analytics = pad.GetSignatureAnalytics();

                Debug.WriteLine("--- Signature Metrics ---");
                Debug.WriteLine($"Stroke Count: {analytics.StrokeCount}");
                Debug.WriteLine($"Total Length: {analytics.TotalLength:F2} px");
                Debug.WriteLine($"Duration: {analytics.TotalDuration.TotalMilliseconds} ms");
                Debug.WriteLine($"Avg Speed: {analytics.AverageStrokeSpeed:F2}");

                // Example validation rule: Reject if too simple
                if (analytics.StrokeCount < 2 || analytics.TotalDuration.TotalSeconds < 0.5)
    {
                MessageBox.Show("Please sign your full name.");
        pad.ClearSignature();
    }
}

Example 3: Custom "Fountain Pen" Style

Configures the pad to mimic the look and feel of a fountain pen ink.

C# - Fountain Pen
private void ApplyFountainPenStyle(SiticoneSignaturePad pad)
{
    pad.BackgroundColor = Color.White;
    pad.StrokeColor = Color.FromArgb(0, 0, 139); // Dark Blue
    
                // Variable width based on speed mimics ink flow
    pad.BaseStrokeWidth = 3.0f;
    pad.MinStrokeWidth = 1.0f;
    pad.MaxStrokeWidth = 5.0f;
    
    pad.EnableVelocitySensitivity = true;
    pad.VelocityFactor = 0.8f; // High sensitivity
    
                // Smooth joins for cursive writing
    pad.StrokeStartCap = LineCap.Round;
    pad.StrokeEndCap = LineCap.Round;
    pad.StrokeLineJoin = LineJoin.Round;
    
    pad.AutoSmoothStrokes = true;
    pad.SmoothingMode = SmoothingMode.HighQuality;
}