mcpField
S
syncfusion-winforms-fontlistbox

syncfusion-winforms-fontlistbox

github.com/syncfusionDesign & UI278 installsUpdated 1w ago
Repository

About syncfusion-winforms-fontlistbox

A skill for implementing Syncfusion FontListBox in Windows Forms applications. The control lists installed system fonts and supports selection modes, type-ahead matching, scrollbars, and visual styles.

Key features

  1. 01Automatic listing of installed fonts
  2. 02Single and multiple selection modes
  3. 03Type-ahead font matching
  4. 04Sorting and item-height controls
  5. 05Scrollbar and visual-style options

Use cases

  1. 01Building a font picker for a text editor
  2. 02Selecting multiple fonts
  3. 03Navigating font names by typing
  4. 04Applying a selected font to another control

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/syncfusion/winforms-ui-components-skills --skill syncfusion-winforms-fontlistbox

After installing, type/syncfusion-winforms-fontlistboxin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

references/
customization-and-behavior.md
getting-started.md
visual-styles.md

Details

From the project README

Implementing the Syncfusion WinForms FontListBox Control

The Syncfusion FontListBox (Syncfusion.Windows.Forms.Tools.FontListBox) is a ListBox-derived control that automatically populates itself with all fonts installed on the user's system. It supports multiple selection modes, type-to-match auto-complete, horizontal scrollbars, item height control, and Office-style visual themes.

When to Use This Skill

Use this skill when you need to:

  • Display a list of installed system fonts — auto-populated on creation
  • Allow users to select a font — apply the selected font to labels, text boxes, or other controls
  • Configure selection modes — single, multi-simple, or multi-extended selection
  • Enable type-to-match auto-complete — UseAutoComplete
  • Apply Office visual styles — VisualStyle with FontListBoxStyle enum
  • Control scrollbar visibility — HorizontalScrollbar, ScrollAlwaysVisible
  • Handle font selection events — SelectedIndexChanged

Component Overview

PropertyTypeDescription
SelectionModeSelectionModeOne, MultiSimple, or MultiExtended
UseAutoCompleteboolType-ahead matching within the list
SortedboolSort font names alphabetically
ItemHeightintHeight in pixels of each list item
HorizontalScrollbarboolShow horizontal scrollbar when items overflow
HorizontalExtentintWidth (px) of the scrollable area when horizontal scrollbar is on
ScrollAlwaysVisibleboolKeep scrollbars visible regardless of item count
VisualStyleFontListBoxStyleOffice/Metro visual theme

Documentation and Navigation Guide

Getting Started

📄 Read: references/getting-started.md

  • Assembly references and NuGet package setup
  • Adding FontListBox via designer or programmatically
  • Auto-population with system fonts
  • SelectionMode — None, One, MultiSimple, MultiExtended
  • Handling SelectedIndexChanged to apply font to another control
Customization and Behavior

📄 Read: references/customization-and-behavior.md

  • ItemHeight — row height per font entry
  • Sorted — alphabetical sorting of font names
  • UseAutoComplete — type-to-match as user types
  • HorizontalScrollbar + HorizontalExtent
  • ScrollAlwaysVisible — force scrollbars always visible
Visual Styles

📄 Read: references/visual-styles.md

  • VisualStyle property using FontListBoxStyle enum
  • Available styles: Default, Metro, Office2016Colorful, Office2016White, Office2016Black, Office2016DarkGray

Quick Start

C#:

using Syncfusion.Windows.Forms.Tools;

FontListBox fontListBox1 = new FontListBox();
fontListBox1.Size = new System.Drawing.Size(160, 94);
fontListBox1.UseAutoComplete = true;
fontListBox1.SelectionMode = System.Windows.Forms.SelectionMode.One;
fontListBox1.SelectedIndexChanged += FontListBox1_SelectedIndexChanged;
this.Controls.Add(fontListBox1);

private void FontListBox1_SelectedIndexChanged(object sender, EventArgs e)
{
    label1.Font = new System.Drawing.Font(
        fontListBox1.SelectedItem.ToString(), 11, System.Drawing.FontStyle.Regular);
}

VB.NET:

Imports Syncfusion.Windows.Forms.Tools

Dim fontListBox1 As New FontListBox()
fontListBox1.Size = New System.Drawing.Size(160, 94)
fontListBox1.UseAutoComplete = True
fontListBox1.SelectionMode = System.Windows.Forms.SelectionMode.One
AddHandler fontListBox1.SelectedIndexChanged, AddressOf FontListBox1_SelectedIndexChanged
Me.Controls.Add(fontListBox1)

Private Sub FontListBox1_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs)
    label1.Font = New System.Drawing.Font(
        fontListBox1.SelectedItem.ToString(), 11, System.Drawing.FontStyle.Regular)
End Sub

Common Use Cases

ScenarioProperties to Set
Font picker for a text editorSelectionMode = One, handle SelectedIndexChanged
Multi-font selectionSelectionMode = MultiExtended
Fast keyboard navigationUseAutoComplete = true
Always show scrollbarScrollAlwaysVisible = true
Alphabetically sorted listSorted = true
Office-style appearanceVisualStyle = FontListBoxStyle.Office2016Colorful

Comments

Markdown supported