ImageCombobox 1.0.3

dotnet add package ImageCombobox --version 1.0.3
                    
NuGet\Install-Package ImageCombobox -Version 1.0.3
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ImageCombobox" Version="1.0.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ImageCombobox" Version="1.0.3" />
                    
Directory.Packages.props
<PackageReference Include="ImageCombobox" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ImageCombobox --version 1.0.3
                    
#r "nuget: ImageCombobox, 1.0.3"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ImageCombobox@1.0.3
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ImageCombobox&version=1.0.3
                    
Install as a Cake Addin
#tool nuget:?package=ImageCombobox&version=1.0.3
                    
Install as a Cake Tool

ImageCombobox

A Windows Forms ComboBox control that supports two-line text items with images.

Features

  • Two-line text display: Each item can show a primary text (bold/larger) and a secondary text (smaller/gray)
  • Image support: Display an optional image next to each item
  • Customizable appearance: Configure fonts, colors, image size, and padding
  • Easy to use: Simple API for adding and managing items
  • Multi-target: Supports .NET Framework 4.7.2, .NET 6.0, and .NET 8.0

Installation

NuGet Package Manager

Install-Package ImageCombobox

.NET CLI

dotnet add package ImageCombobox

Usage

Basic Usage (VB.NET)

' Add the control to your form
Dim combo As New ImageComboBox()
combo.Location = New Point(10, 10)
combo.Size = New Size(300, 50)
Me.Controls.Add(combo)

' Add items with two lines of text
combo.AddItem("Primary Text", "Secondary description text")

' Add items with image
combo.AddItem("Item with Image", "Description", My.Resources.SomeImage)

' Or create items manually
Dim item As New ImageComboBoxItem()
item.PrimaryText = "Custom Item"
item.SecondaryText = "With custom properties"
item.Image = Image.FromFile("path/to/image.png")
item.Tag = someCustomData
combo.Items.Add(item)

Basic Usage (C#)

// Add the control to your form
var combo = new ImageComboBox();
combo.Location = new Point(10, 10);
combo.Size = new Size(300, 50);
this.Controls.Add(combo);

// Add items with two lines of text
combo.AddItem("Primary Text", "Secondary description text");

// Add items with image
combo.AddItem("Item with Image", "Description", Properties.Resources.SomeImage);

// Or create items manually
var item = new ImageComboBoxItem
{
    PrimaryText = "Custom Item",
    SecondaryText = "With custom properties",
    Image = Image.FromFile("path/to/image.png"),
    Tag = someCustomData
};
combo.Items.Add(item);

Customizing Appearance

' Set image size
combo.ImageSize = New Size(48, 48)

' Set custom fonts
combo.PrimaryFont = New Font("Segoe UI", 10, FontStyle.Bold)
combo.SecondaryFont = New Font("Segoe UI", 8, FontStyle.Regular)

' Set secondary text color
combo.SecondaryTextColor = Color.Gray

' Set item padding
combo.ItemPadding = New Padding(6)

Getting Selected Item

' Get the selected item
Dim selectedItem As ImageComboBoxItem = combo.GetSelectedItem()
If selectedItem IsNot Nothing Then
    Console.WriteLine($"Selected: {selectedItem.PrimaryText}")
    Console.WriteLine($"Description: {selectedItem.SecondaryText}")
End If

' Get item at specific index
Dim item As ImageComboBoxItem = combo.GetItemAt(0)

Properties

Property Type Description
ImageSize Size Size of the images displayed in items (default: 32x32)
PrimaryFont Font Font used for the primary text
SecondaryFont Font Font used for the secondary text
SecondaryTextColor Color Color of the secondary text (default: GrayText)
ItemPadding Padding Padding around each item (default: 4)

ImageComboBoxItem Properties

Property Type Description
PrimaryText String The main text displayed in the first line
SecondaryText String The secondary text displayed in the second line
Image Image The image displayed next to the text
Tag Object Custom data associated with the item

License

MIT License - see LICENSE file for details.

Product Compatible and additional computed target framework versions.
.NET Framework net472 is compatible.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.7.2

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.3 295 12/16/2025