In This Article

FontFamilyComboBox Class

Represents a font family combobox control.

public class FontFamilyComboBox : ComboBox, IKeyTipTarget, IVariantControl
Inheritance:
object Visual UIElement FrameworkElement Control ItemsControl Selector ComboBox ComboBoxBase ComboBox object
Implements:
IKeyTipTarget IVariantControl

Remarks

For detailed documentation on this control's features and how to use them, please see the FontFamilyComboBox documentation topic.

Constructors

FontFamilyComboBox()

Initializes an instance of the FontFamilyComboBox class.

public FontFamilyComboBox()

Properties

IsTypefaceValidationEnabled

Gets or sets whether typeface validation is enabled, meaning each loaded font-family is examined to ensure its typefaces can be loaded without error.

public bool IsTypefaceValidationEnabled { get; set; }

Property Value

bool:

true if each FontFamily's typefaces should be examined; otherwise, false. The default value is false.

Remarks

When this property is true, there may be a delay before the drop-down list is displayed while font families are examined.

UsePreviewInItemRendering

Gets or sets whether to use each FontFamily in the rendering of items.

public bool UsePreviewInItemRendering { get; set; }

Property Value

bool:

true if each FontFamily should be used in the rendering of items; otherwise, false. The default value is true.

Remarks

When this property is true, there may be a brief delay the first time the drop-down list is displayed since each FontFamily must be loaded for use by WPF.

Methods

CoerceCommandParameter(DependencyObject, object)

Coerces a new CommandParameterProperty value.

protected override object CoerceCommandParameter(DependencyObject obj, object value)
Parameter Type Description
obj DependencyObject

The System.Windows.DependencyObject whose property is changed.

value object

The new value being set.

Returns

object:

The coerced value to set.

GetFontFamily(string)

Returns the FontFamily that was created with the specified font family name.

public static FontFamily GetFontFamily(string fontFamilyName)
Parameter Type Description
fontFamilyName string

Returns

FontFamily:

The FontFamily that was created with the specified font family name.

IsValidFontFamilyName(string)

Returns whether the specified font family name is valid.

public static bool IsValidFontFamilyName(string fontFamilyName)
Parameter Type Description
fontFamilyName string

The font family name to examine.

Returns

bool:

true if the specified font family name is valid; otherwise, false.

OnInitialized(EventArgs)

Occurs after the control has been initialized.

protected override void OnInitialized(EventArgs e)
Parameter Type Description
e EventArgs

An EventArgs that contains the event data.

RefreshFontFamilies()

Refreshes the list with the current system font families.

public virtual void RefreshFontFamilies()

Fields

IsTypefaceValidationEnabledProperty

Identifies the IsTypefaceValidationEnabled dependency property. This field is read-only.

public static readonly DependencyProperty IsTypefaceValidationEnabledProperty

UsePreviewInItemRenderingProperty

Identifies the UsePreviewInItemRendering dependency property. This field is read-only.

public static readonly DependencyProperty UsePreviewInItemRenderingProperty

Inherited Members