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 isfalse
.
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 istrue
.
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
- ComboBox.ActiveItemChangedEvent
- ComboBox.ActiveItemProperty
- ComboBox.IsPreviewEnabledProperty
- ComboBox.StaysOpenOnClickProperty
- ComboBox.TextToValueConverterProperty
- ComboBox.ExtractDataItem(object)
- ComboBox.IsNullValue(object)
- ComboBox.OnActiveItemChanged(object, object)
- ComboBox.OnClick(ExecuteRoutedEventArgs)
- ComboBox.OnDropDownClosed(EventArgs)
- ComboBox.OnDropDownOpened(EventArgs)
- ComboBox.OnGotKeyboardFocus(KeyboardFocusChangedEventArgs)
- ComboBox.OnKeyDown(KeyEventArgs)
- ComboBox.OnLostKeyboardFocus(KeyboardFocusChangedEventArgs)
- ComboBox.OnPreviewKeyDown(KeyEventArgs)
- ComboBox.OnSelectionChanged(SelectionChangedEventArgs)
- ComboBox.SetText(string)
- ComboBox.UpdateCanExecute()
- ComboBox.ActiveItem
- ComboBox.IsPreviewEnabled
- ComboBox.StaysOpenOnClick
- ComboBox.TextToValueConverter
- ComboBox.ActiveItemChanged
- ComboBoxBase.ClickEvent
- ComboBoxBase.PreviewClickEvent
- ComboBoxBase.ScreenTipClosingEvent
- ComboBoxBase.ScreenTipOpeningEvent
- ComboBoxBase.CommandProperty
- ComboBoxBase.CommandParameterProperty
- ComboBoxBase.CommandTargetProperty
- ComboBoxBase.ContextProperty
- ComboBoxBase.HasImageProperty
- ComboBoxBase.HasLabelProperty
- ComboBoxBase.HintProperty
- ComboBoxBase.HintTemplateProperty
- ComboBoxBase.HintTemplateSelectorProperty
- ComboBoxBase.IdProperty
- ComboBoxBase.ImageSourceLargeProperty
- ComboBoxBase.ImageSourceSmallProperty
- ComboBoxBase.IsHighlightedProperty
- ComboBoxBase.IsPointerOverProperty
- ComboBoxBase.KeyTipAccessTextProperty
- ComboBoxBase.LabelProperty
- ComboBoxBase.ScreenTipDescriptionProperty
- ComboBoxBase.ScreenTipFooterProperty
- ComboBoxBase.ScreenTipHeaderProperty
- ComboBoxBase.ScreenTipHelpUriProperty
- ComboBoxBase.ScreenTipImageSourceProperty
- ComboBoxBase.VariantSizeProperty
- ComboBoxBase.OnCommandChanged(ICommand, ICommand)
- ComboBoxBase.OnContextChanged(ControlContext, ControlContext)
- ComboBoxBase.OnCreateAutomationPeer()
- ComboBoxBase.OnItemsChanged(NotifyCollectionChangedEventArgs)
- ComboBoxBase.OnKeyTipAccessed(string)
- ComboBoxBase.OnMouseEnter(MouseEventArgs)
- ComboBoxBase.OnMouseLeave(MouseEventArgs)
- ComboBoxBase.OnPreviewClick(ExecuteRoutedEventArgs)
- ComboBoxBase.OnPropertyChanged(DependencyPropertyChangedEventArgs)
- ComboBoxBase.OnScreenTipClosing(RoutedEventArgs)
- ComboBoxBase.OnScreenTipOpening(RoutedEventArgs)
- ComboBoxBase.OnTouchLeave(TouchEventArgs)
- ComboBoxBase.OnValidateItems(IList)
- ComboBoxBase.OnVariantSizeChanged(VariantSize, VariantSize)
- ComboBoxBase.RaiseClickEvent(ExecuteRoutedEventArgs)
- ComboBoxBase.CanUpdateCanExecuteWhenHidden
- ComboBoxBase.Command
- ComboBoxBase.CommandParameter
- ComboBoxBase.CommandTarget
- ComboBoxBase.Context
- ComboBoxBase.HasImage
- ComboBoxBase.HasLabel
- ComboBoxBase.Hint
- ComboBoxBase.HintTemplate
- ComboBoxBase.HintTemplateSelector
- ComboBoxBase.Id
- ComboBoxBase.ImageSourceLarge
- ComboBoxBase.ImageSourceSmall
- ComboBoxBase.IsHighlighted
- ComboBoxBase.IsPointerOver
- ComboBoxBase.KeyTipAccessText
- ComboBoxBase.Label
- ComboBoxBase.ScreenTipDescription
- ComboBoxBase.ScreenTipFooter
- ComboBoxBase.ScreenTipHeader
- ComboBoxBase.ScreenTipHelpUri
- ComboBoxBase.ScreenTipImageSource
- ComboBoxBase.VariantSize
- ComboBoxBase.Click
- ComboBoxBase.PreviewClick
- ComboBoxBase.ScreenTipClosing
- ComboBoxBase.ScreenTipOpening