Siticone Logo
Siticone UI
DOCS
v2025.12.15
Docs ListView

Siticone ListView

The SiticoneListView is a modern, customizable list control that supersedes the standard Windows Forms ListBox. It features smooth rendering, advanced drag-and-drop capabilities, built-in themes, and a highly configurable appearance.

Theme & Appearance

Control the visual style of the list using predefined presets or granular color customization.

Property Type Description & Usage Example
ThemePreset ListViewThemePreset lv.ThemePreset = ListViewThemePreset.Dark; Applies a predefined color theme (Default, Light, Dark, Colorful, Minimalist, Professional).
ListBackColor Color lv.ListBackColor = Color.White; The main background color of the control.
ListBorderColor Color lv.ListBorderColor = Color.LightGray; The color of the control's border.
ControlRadius int lv.ControlRadius = 10; The corner radius of the entire control container.
ItemRadius int lv.ItemRadius = 6; The corner radius for individual list items.
AlternateRowColor Color lv.AlternateRowColor = Color.AliceBlue; Background color for alternate rows (zebra striping).
UseAlternateRowColor bool lv.UseAlternateRowColor = true; Enables or disables zebra striping for rows.
TransparentBackground bool lv.TransparentBackground = true; Makes item backgrounds transparent when ControlRadius > 0.

Selection & Behavior

Configure how items are selected, including multi-select support and checkmark styles.

Property Type Description & Usage Example
ListViewSelectionMode ListViewSelectionMode lv.ListViewSelectionMode = ListViewSelectionMode.Multiple; Determines selection behavior: None, One, or Multiple.
ShowCheckmarks bool lv.ShowCheckmarks = true; If true, selected items display a checkmark instead of a full background highlight.
CheckmarkStyle CheckmarkStyle lv.CheckmarkStyle = CheckmarkStyle.Filled; Visual style of the checkmark: TickOnly or Filled (circle background).
CheckmarkColor Color lv.CheckmarkColor = Color.Green;
SelectedItemBackColor Color lv.SelectedItemBackColor = Color.DodgerBlue; Background color for selected items (when Checkmarks are disabled).
HighlightOnHover bool lv.HighlightOnHover = true; Enables or disables visual highlighting when the mouse hovers over an item.

A built-in header area that sits above the list items.

Property Type Description & Usage Example
ShowHeader bool lv.ShowHeader = true; Shows or hides the header area.
HeaderText string lv.HeaderText = "My Task List"; The title text displayed in the header.
HeaderHeight int lv.HeaderHeight = 40;
HeaderBackColor Color lv.HeaderBackColor = Color.WhiteSmoke;
ShowHeaderDivider bool lv.ShowHeaderDivider = true; Draws a separator line between the header and the list items.

Drag & Drop

Built-in support for reordering items via drag and drop.

Property Type Description & Usage Example
AllowItemDragging bool lv.AllowItemDragging = true; Enables reordering items by clicking and dragging. Visual indicators show where the item will drop.

Functionality for finding items within the list.

Property Type Description
CurrentSearchText string Read-only. Gets the current text typed by the user during a keyboard search.
IsSearching bool Read-only. Indicates if a keyboard search operation is currently active.

Public Methods

Selection Methods
// Selects all items (only works if SelectionMode is Multiple)
siticoneListView1.SelectAllItems();

// Deselects all currently selected items
siticoneListView1.DeselectAllItems();

// Programmatically show the context menu for a specific item
siticoneListView1.ShowItemContextMenu(myContextMenuStrip, itemIndex, locationPoint);

Events

Common Events
// Occurs when an item is clicked
lv.ItemClick += (s, e) => {
                Console.WriteLine($"Clicked: {e.ItemText} at index {e.ItemIndex}");
};

// Occurs when selection changes (includes multi-select support)
lv.ItemsSelected += (s, e) => {
                Console.WriteLine($"Selected count: {e.SelectedIndices.Count}");
    foreach(var item in e.SelectedItems) {
                // Process items
    }
};

// Occurs when an item is dropped after dragging
lv.ItemDrop += (s, e) => {
                Console.WriteLine($"Moved item from {e.SourceIndex} to {e.TargetIndex}");
                // Set Handled = true if you want to perform custom data reordering
                // e.Handled = true;
};

// Search events
lv.SearchTextChanged += (s, e) => {
                Console.WriteLine($"Searching for: {e.SearchText}");
};

Enumerations

ListViewThemePreset
public enum ListViewThemePreset
{
    Default,
    Light,        // Soft, bright colors
    Dark,         // Deep, muted colors
    Colorful,     // Vibrant accents
    Minimalist,   // Clean, neutral colors
    Professional  // Sophisticated palette
}
CheckmarkStyle
public enum CheckmarkStyle
{
    TickOnly,     // Only shows the check symbol
    Filled        // Shows a filled circle background with check
}

Detailed Usage Examples

Example 1: Todo List with Checkmarks

Creates a modern Todo list using the "Professional" theme and filled checkmarks.

C# - Todo List Setup
private void SetupTodoList()
{
    var lv = siticoneListView1;
    
                // 1. Apply Theme
    lv.ThemePreset = ListViewThemePreset.Professional;
    
                // 2. Configuration for Todo style
    lv.ShowHeader = true;
    lv.HeaderText = "Pending Tasks";
    lv.ItemHeight = 45;
    lv.ControlRadius = 12;
    lv.ItemRadius = 8;
    
                // 3. Selection Settings
    lv.ListViewSelectionMode = ListViewSelectionMode.Multiple;
    lv.ShowCheckmarks = true;
    lv.CheckmarkStyle = CheckmarkStyle.Filled;
    lv.FilledCheckmarkColor = Color.White;
    lv.CheckmarkColor = Color.SeaGreen;

                // 4. Add Data
    lv.Items.Add("Review Project Proposal");
    lv.Items.Add("Email Marketing Team");
    lv.Items.Add("Update Server Config");
}

Example 2: Reorderable Playlist

Demonstrates how to enable drag-and-drop to reorder items, useful for playlists or priority queues.

C# - Drag & Drop Playlist
private void SetupPlaylist()
{
    var lv = siticoneListView1;

                // Enable Dragging
    lv.AllowItemDragging = true;
    
                // Visual styling for a media player look
    lv.ThemePreset = ListViewThemePreset.Dark;
    lv.ItemHeight = 40;
    lv.ShowItemDividers = true;
    lv.DividerColor = Color.FromArgb(60, 60, 60);
    
                // Handle the Drop Event to update your backend data
    lv.ItemDrop += (sender, e) => 
    {
                // The UI updates automatically, but you might need to sync your database/list
                Debug.WriteLine($"Track moved to position {e.TargetIndex}");
        
                // Example: _myMusicList.Move(e.SourceIndex, e.TargetIndex);
    };
}

Example 3: Searchable File List with Icons

Uses an ImageList to display icons and enables keyboard searching (typing automatically finds items).

C# - Searchable Icons
private void SetupFileManager()
{
    var lv = siticoneListView1;
    
                // 1. Setup Icons
                ImageList icons = new ImageList();
    icons.ImageSize = new Size(24, 24);
    icons.Images.Add(Properties.Resources.FolderIcon);
    icons.Images.Add(Properties.Resources.FileIcon);
    
    lv.ItemIcons = icons;
    lv.ShowItemIcons = true;
    lv.IconTextSpacing = 10;
    
                // 2. Enable Keyboard Navigation & Search
    lv.AllowKeyboardNavigation = true;
    
                // 3. Add items
    lv.Items.Add("Documents"); // Shows index 0 icon
    lv.Items.Add("Pictures");  // Shows index 1 icon
    
                // 4. React to Search
    lv.SearchTextChanged += (sender, e) => 
    {
                // Highlight matches or show status
        lblStatus.Text = $"Searching: {e.SearchText}";
    };
}