FontAutoCompleteBox
July 29, 2026 ยท View on GitHub
An AutoCompleteBox that suggests the font families installed on the system and renders every suggestion in the font it names.
<mosaic:FontAutoCompleteBox
Watermark="Search fonts..."
SelectedFontName="{Binding EditorFontName, Mode=TwoWay}" />
| Property | Type | Default | Description |
|---|---|---|---|
SelectedFontFamily | FontFamily? | null | The selected family. Two-way by default. |
SelectedFontName | string? | null | The selected family name, e.g. Segoe UI. Two-way by default. |
ShowFontPreview | bool | true | Renders each suggested font name in its own font. |
PreviewFontSize | double | 15 | Size of the preview text. |
Everything inherited from AutoCompleteBox still applies (Text, Watermark, FilterMode, DropDownMaxHeight, IsDropDownOpen, the DropDownOpened/DropDownClosed routed events, and so on), with these defaults adjusted for a fixed, in-memory list:
IsTextRequiredForSuggestionsisfalseandMinimumPrefixLengthis0, so opening the drop-down lists the whole catalog.MaxSuggestionCountcovers every installed font.LookupDelayis 75 ms rather than 250 ms, since filtering is a local operation.
Notes:
- The item list comes from
FontFamilyCatalogโ do not setItemsSourcemanually. SelectedFontFamily,SelectedFontName, andSelectedItemall stay in sync; setting any one updates the others.- Filtering is
Containsby default; setFilterMode="StartsWith"for prefix matching. - Typed text that does not resolve to an installed font leaves the selection empty.
- Assigning an
ItemTemplateexplicitly overrides whateverShowFontPreviewwould apply. - The control reuses the
AutoCompleteBoxdefault template rather than registering its own style.
See also: FontComboBox.