FontWeightComboBox
July 30, 2026 · View on GitHub
A ComboBox that lists the standard font weights (Thin through ExtraBlack), each entry rendered in the weight it names. The selection is exposed both as a FontWeight and as a string name, so a view model can bind whichever it stores.
<mosaic:FontWeightComboBox SelectedFontWeight="{Binding HeadingWeight, Mode=TwoWay}" />
Previews are on by default; turn them off for plain text:
<mosaic:FontWeightComboBox
PreviewFontSize="16"
ShowWeightPreview="False"
SelectedFontWeightName="{Binding HeadingWeightName, Mode=TwoWay}" />
| Property | Type | Default | Description |
|---|---|---|---|
SelectedFontWeight | FontWeight | FontWeights.Normal | The selected weight. Two-way by default. |
SelectedFontWeightName | string? | null | The selected weight name, e.g. SemiBold. Two-way by default. |
ShowWeightPreview | bool | true | Renders each weight name in its own weight. |
PreviewFontSize | double | 14 | Size of the preview text. |
Notes:
- The item list comes from
FontWeightCatalog— do not setItemsSourcemanually. - Ten distinct weights are listed: Thin, ExtraLight, Light, Normal, Medium, SemiBold, Bold, ExtraBold, Black, ExtraBlack. The aliases (
Regular,DemiBold,UltraBold,Heavy,UltraLight,UltraBlack) are not listed separately because they resolve to the same OpenType weights, butFontWeightCatalog.Findstill accepts them — as it does the numeric weights, e.g."600". SelectedFontWeight,SelectedFontWeightName, andSelectedItemall stay in sync; setting any one updates the others.- A non-standard weight cannot be selected and leaves the selection empty.
- Assigning an
ItemTemplateexplicitly overrides whateverShowWeightPreviewwould apply. - The control reuses the standard (or opt-in native Mosaic) ComboBox styling — no custom template.
- The
PropertyGriduses this control automatically for anyFontWeightproperty.
See also: FontComboBox, FontAutoCompleteBox.