Siticone Logo
Siticone UI
DOCS
v2025.12.15
Docs Picture Box

Siticone PictureBox

The SiticonePictureBox is a powerful image control that extends the standard Windows Forms PictureBox with advanced rendering capabilities. It includes built-in support for rounded corners, circular shapes, image filters (brightness, contrast), slideshows, shadows, and interactive features like drag-and-drop and zoom/pan.

Image & Display

Fundamental properties for loading and displaying images with high-quality rendering.

Property Type Description & Usage Example
Image Image picBox.Image = Image.FromFile("photo.jpg"); The primary image displayed in the control.
PlaceholderImage Image picBox.PlaceholderImage = Resources.DefaultAvatar; An optional image shown when Image is null (requires EnablePlaceholder = true).
SizeMode SiticonePictureBoxSizeMode picBox.SizeMode = SiticonePictureBoxSizeMode.Zoom; Controls how the image fits: Normal, StretchImage, AutoSize, CenterImage, or Zoom.
CornerRadius int picBox.CornerRadius = 15; Rounds the corners of the control. Set to 0 for square corners.
IsCircular bool picBox.IsCircular = true; Forces the control into a perfect circle, ideal for profile pictures. Overrides CornerRadius.

Visual Effects & Filters

Apply real-time image processing effects without modifying the original image data.

Property Type Description & Usage Example
EnableFilters bool picBox.EnableFilters = true; Enables brightness, contrast, and saturation adjustments.
Brightness float picBox.Brightness = 1.2f; Adjusts image brightness. 1.0 is normal, >1 is brighter, <1 is darker.
Contrast float picBox.Contrast = 1.5f; Adjusts image contrast. 1.0 is normal.
Grayscale bool picBox.Grayscale = true; Renders the image in black and white.
EnableShadow bool picBox.EnableShadow = true; Draws a soft shadow behind the image content.
EnableGlow bool picBox.EnableGlow = true; Adds a glowing aura around the image edges.

Transformations

Rotate and flip images dynamically.

Property Type Description & Usage Example
EnableRotation bool picBox.EnableRotation = true; Allows the image to be rotated via RotationAngle.
RotationAngle float picBox.RotationAngle = 90f; Rotation angle in degrees (0-360).
EnableFlipping bool picBox.EnableFlipping = true; Enables horizontal and vertical flipping.
FlipHorizontal bool picBox.FlipHorizontal = true; Mirrors the image left-to-right.

Interaction & Features

Advanced capabilities for building rich media applications.

Property Type Description & Usage Example
EnableSlideshow bool picBox.EnableSlideshow = true; Cycles through the Images collection automatically.
Images List<Image> picBox.Images.Add(img1); The list of images used in the slideshow.
EnableDragDrop bool picBox.EnableDragDrop = true; Allows users to drag image files from Explorer directly onto the control.
EnableMouseInteraction bool picBox.EnableMouseInteraction = true; Enables Pan (Left Click + Drag) and Zoom (Mouse Wheel) functionality.
DraggingSpeed float picBox.DraggingSpeed = 2.0f; Sensitivity multiplier for panning operations.

Performance

Optimization settings for handling high-resolution images or complex UIs.

Property Type Description
EnableAsyncLoading bool Loads images on a background thread to prevent UI freezing.
EnableCaching bool Caches the rendered output to reduce CPU usage on repaints.
EnableHighDpiSupport bool Scales images automatically based on the system DPI settings.

Public Methods

LoadImageAsync(string path)
// Asynchronously loads an image from a file path.
// Requires EnableAsyncLoading = true.
siticonePictureBox1.LoadImageAsync(@"C:\Images\background.png");
LoadImageFromUrlAsync(string url)
// Downloads and displays an image from a web URL.
// Requires EnableExtendedImageSources = true.
siticonePictureBox1.LoadImageFromUrlAsync("https://example.com/image.jpg");

Detailed Usage Examples

Example 1: Circular Profile Picture

Creates a stylish, circular user avatar with a border and shadow.

C# - Profile Avatar
private SiticonePictureBox CreateProfileAvatar()
{
                var avatar = new SiticonePictureBox
    {
        Size = new Size(120, 120),
        SizeMode = SiticonePictureBoxSizeMode.Zoom,
        
                // Make it circular
        IsCircular = true,
        
                // Border Styling
        ShowBorder = true,
        BorderColor = Color.White,
        BorderWidth = 3,
        
                // Visual Depth
        EnableShadow = true,
        
                // Placeholder for when no image is set
        EnablePlaceholder = true,
        PlaceholderImage = Properties.Resources.DefaultUser
    };

                return avatar;
}

Example 2: Interactive Image Viewer

An image viewer that supports Zooming (Wheel) and Panning (Drag), ideal for maps or diagrams.

C# - Zoom & Pan
private void SetupImageViewer(SiticonePictureBox viewer)
{
    viewer.Image = Image.FromFile("map.png");
    
                // Enable Interaction
    viewer.EnableMouseInteraction = true;
    viewer.DraggingSpeed = 2.5f; // Adjust pan sensitivity
    
                // Enable Async Loading for large files
    viewer.EnableAsyncLoading = true;
    viewer.EnableHighDpiSupport = true;
    
                // Optional: Add simple rotation controls
    viewer.EnableRotation = true;
    btnRotate.Click += (s, e) => viewer.RotationAngle += 90;
}

Example 3: Auto-Playing Slideshow

Configures a component to cycle through a list of marketing banners.

C# - Slideshow
private void StartBannerSlideshow(SiticonePictureBox bannerBox)
{
                // Populate images
    bannerBox.Images = new List<Image> 
    { 
                Resources.Banner1, 
                Resources.Banner2, 
                Resources.Banner3 
    };
    
                // Configure Slideshow
    bannerBox.EnableSlideshow = true;
    
                // Styling
    bannerBox.CornerRadius = 10;
    bannerBox.SizeMode = SiticonePictureBoxSizeMode.StretchImage;
}

Example 4: Drag & Drop Uploader

Allows users to drag files onto the control to load them instantly.

C# - Drag & Drop
private void SetupUploader(SiticonePictureBox uploader)
{
    uploader.EnableDragDrop = true;
    uploader.EnableAsyncLoading = true;
    
                // Visual cue
    uploader.ShowBorder = true;
    uploader.BorderColor = Color.LightGray;
    uploader.BorderWidth = 2;
    // Note: DashStyle is not a direct property, but custom painting could add it.
    
                // Placeholder text image
    uploader.PlaceholderImage = Resources.DropHereIcon;
    uploader.EnablePlaceholder = true;
}