WPF

Code Examples Upgrade Guide User Guide Demos Support Forums Download
  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class FontListBox

    Show / Hide Table of Contents

    Class FontListBox

    Represents the list of fonts.

    Inheritance
    System.Object
    FontListBase
    FontListBox
    Inherited Members
    FontListBase.OnAllFontsChanged(DependencyPropertyChangedEventArgs)
    FontListBase.CoerceAllFontsProperty(DependencyObject, Object)
    FontListBase.AllFontsChanged
    Namespace: Syncfusion.Windows.Tools.Controls
    Assembly: Syncfusion.Tools.Wpf.dll
    Syntax
    [SkinType(SkinVisualStyle = Skin.VS2010, Type = typeof(FontListBox), XamlResource = "/Syncfusion.Tools.Wpf.Classic;component/Controls/FontListBox/Themes/VS2010Style.xaml")]
    [SkinType(SkinVisualStyle = Skin.Office2007Black, Type = typeof(FontListBox), XamlResource = "/Syncfusion.Tools.Wpf.Classic;component/Controls/FontListBox/Themes/Office2007BlackStyle.xaml")]
    [SkinType(SkinVisualStyle = Skin.Office2007Silver, Type = typeof(FontListBox), XamlResource = "/Syncfusion.Tools.Wpf.Classic;component/Controls/FontListBox/Themes/Office2007SilverStyle.xaml")]
    [SkinType(SkinVisualStyle = Skin.Office2010Blue, Type = typeof(FontListBox), XamlResource = "/Syncfusion.Tools.Wpf.Classic;component/Controls/FontListBox/Themes/Office2010BlueStyle.xaml")]
    [SkinType(SkinVisualStyle = Skin.Office2010Black, Type = typeof(FontListBox), XamlResource = "/Syncfusion.Tools.Wpf.Classic;component/Controls/FontListBox/Themes/Office2010BlackStyle.xaml")]
    [SkinType(SkinVisualStyle = Skin.Office2010Silver, Type = typeof(FontListBox), XamlResource = "/Syncfusion.Tools.Wpf.Classic;component/Controls/FontListBox/Themes/Office2010SilverStyle.xaml")]
    [SkinType(SkinVisualStyle = Skin.Office2003, Type = typeof(FontListBox), XamlResource = "/Syncfusion.Tools.Wpf.Classic;component/Controls/FontListBox/Themes/Office2003Style.xaml")]
    [SkinType(SkinVisualStyle = Skin.ShinyBlue, Type = typeof(FontListBox), XamlResource = "/Syncfusion.Tools.Wpf.Classic;component/Controls/FontListBox/Themes/ShinyBlueStyle.xaml")]
    [SkinType(SkinVisualStyle = Skin.ShinyRed, Type = typeof(FontListBox), XamlResource = "/Syncfusion.Tools.Wpf.Classic;component/Controls/FontListBox/Themes/ShinyRedStyle.xaml")]
    [SkinType(SkinVisualStyle = Skin.SyncOrange, Type = typeof(FontListBox), XamlResource = "/Syncfusion.Tools.Wpf.Classic;component/Controls/FontListBox/Themes/SyncOrangeStyle.xaml")]
    [SkinType(SkinVisualStyle = Skin.Blend, Type = typeof(FontListBox), XamlResource = "/Syncfusion.Tools.Wpf.Classic;component/Controls/FontListBox/Themes/BlendStyle.xaml")]
    [SkinType(SkinVisualStyle = Skin.Metro, Type = typeof(FontListBox), XamlResource = "/Syncfusion.Tools.Wpf.Classic;component/Controls/FontListBox/Themes/MetroStyle.xaml")]
    [SkinType(SkinVisualStyle = Skin.Office2007Blue, Type = typeof(FontListBox), XamlResource = "/Syncfusion.Tools.Wpf.Classic;component/Controls/FontListBox/Themes/Office2007BlueStyle.xaml")]
    [SkinType(SkinVisualStyle = Skin.Transparent, Type = typeof(FontListBox), XamlResource = "/Syncfusion.Tools.Wpf.Classic;component/Controls/FontListBox/Themes/TransparentStyle.xaml")]
    [SkinType(SkinVisualStyle = Skin.Default, Type = typeof(FontListBox), XamlResource = "/Syncfusion.Tools.Wpf;component/Controls/FontListBox/Themes/Generic.xaml")]
    public class FontListBox : FontListBase

    Constructors

    FontListBox()

    Initializes a new instance of the FontListBox class.

    Declaration
    public FontListBox()

    Fields

    DisplayFontNamesInSystemFontProperty

    Identifies the DisplayFontNamesInSystemFont dependency property.

    Declaration
    public static readonly DependencyProperty DisplayFontNamesInSystemFontProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    FocusedFontFamilyProperty

    Identifies the FocusedFontFamily dependency property.

    Declaration
    public static readonly DependencyProperty FocusedFontFamilyProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    FontsSourceProperty

    Identifies the FontsSource dependency property.

    Declaration
    public static readonly DependencyProperty FontsSourceProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    GroupHeaderStyleProperty

    Identifies the GroupHeaderStyle dependency property.

    Declaration
    public static readonly DependencyProperty GroupHeaderStyleProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    HasFocusProperty

    Identifies the HasFocus dependency property.

    Declaration
    public static readonly DependencyProperty HasFocusProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    ItemContainerStyleProperty

    Identifies the ItemContainerStyle dependency property.

    Declaration
    public static readonly DependencyProperty ItemContainerStyleProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    ItemTemplateProperty

    Identifies the ItemTemplate dependency property.

    Declaration
    public static readonly DependencyProperty ItemTemplateProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    RecentlyUsedFontsProperty

    Identifies the RecentlyUsedFonts dependency property.

    Declaration
    public static readonly DependencyProperty RecentlyUsedFontsProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    SelectedFontFamilyProperty

    Identifies the SelectedFontFamily dependency property.

    Declaration
    public static readonly DependencyProperty SelectedFontFamilyProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    ThemeFontsProperty

    Identifies the ThemeFonts dependency property.

    Declaration
    public static readonly DependencyProperty ThemeFontsProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    Properties

    DisplayFontNamesInSystemFont

    Gets or sets a value indicating whether fonts should be displayed like system font. This is a dependency property.

    Declaration
    public bool DisplayFontNamesInSystemFont { get; set; }
    Property Value
    Type Description
    System.Boolean

    Type: System.Boolean Default value is false.

    See Also
    System.Boolean

    FocusedFontFamily

    Gets or sets the focused font family. This is a dependency property.

    Declaration
    public FontFamily FocusedFontFamily { get; set; }
    Property Value
    Type Description
    System.Windows.Media.FontFamily

    Type: System.Windows.Media.FontFamily

    Remarks

    Focused font family is displayed in text box of FontListComboBox control.

    See Also
    System.Windows.Media.FontFamily

    FontsSource

    Gets or sets the source for the font collection. This is a dependency property.

    Declaration
    public object FontsSource { get; set; }
    Property Value
    Type Description
    System.Object

    Type: System.Object Default value is "System".

    Examples

    FontListBox fontListBox1 = new FontListBox(); FontCollection collection = new FontCollection(); collection.Add(new FontFamily("Tahoma")); collection.Add(new FontFamily("Century")); collection.Add(new FontFamily("Arial")); fontListBox1.FontsSource = collection;

    See Also
    System.Object

    GroupHeaderStyle

    Gets or sets the style of the group header. This is a dependency property.

    Declaration
    public Style GroupHeaderStyle { get; set; }
    Property Value
    Type Description
    System.Windows.Style

    Type: System.Windows.Style

    See Also
    System.Windows.Style

    HasFocus

    Gets or sets a value indicating whether control has focus. This is a dependency property.

    Declaration
    public bool HasFocus { get; set; }
    Property Value
    Type Description
    System.Boolean

    Type: System.Boolean Default value is false.

    See Also
    System.Boolean

    ItemContainerStyle

    Gets or sets the style of the item container. This is a dependency property.

    Declaration
    public Style ItemContainerStyle { get; set; }
    Property Value
    Type Description
    System.Windows.Style

    Type: System.Windows.Style

    See Also
    System.Windows.Style

    ItemTemplate

    Gets or sets the template of the item. This is a dependency property.

    Declaration
    public DataTemplate ItemTemplate { get; set; }
    Property Value
    Type Description
    System.Windows.DataTemplate

    Type: System.Windows.DataTemplate

    See Also
    System.Windows.DataTemplate

    RecentlyUsedFonts

    Gets or sets the collection of recently used fonts. This is a dependency property.

    Declaration
    public FontCollection RecentlyUsedFonts { get; set; }
    Property Value
    Type Description
    FontCollection

    Type: FontCollection

    Examples

    FontListBox fontListBox1 = new FontListBox(); FontFamily font = new FontFamily( "Century" ); fontListBox1.RecentlyUsedFonts.Add( font );

    See Also
    FontCollection

    SelectedFontFamily

    Gets or sets the selected font family. This is a dependency property.

    Declaration
    public FontFamily SelectedFontFamily { get; set; }
    Property Value
    Type Description
    System.Windows.Media.FontFamily

    Type: System.Windows.Media.FontFamily

    Remarks

    Selected font family is displayed in text box of FontListComboBox control.

    See Also
    System.Windows.Media.FontFamily

    ThemeFonts

    Gets or sets the collection of theme fonts. This is a dependency property.

    Declaration
    public ThemeFontFamilyCollection ThemeFonts { get; set; }
    Property Value
    Type Description
    ThemeFontFamilyCollection

    Type: ThemeFontFamilyCollection

    Examples

    FontListBox fontListBox1 = new FontListBox(); ThemeFontFamily font1 = new ThemeFontFamily( "Century", "(body)" ); ThemeFontFamily font2 = new ThemeFontFamily( "Arial", "(heading)" ); fontListBox1.ThemeFonts.Add( font1 ); fontListBox1.ThemeFonts.Add( font2 );

    See Also
    ThemeFontFamilyCollection

    Methods

    CoerceRecentlyUsedFontsProperty(DependencyObject, Object)

    Coerces RecentlyUsedFonts property. Fulfils the logic before setting the RecentlyUsedFonts value.

    Declaration
    public static object CoerceRecentlyUsedFontsProperty(DependencyObject d, object baseValue)
    Parameters
    Type Name Description
    System.Windows.DependencyObject d

    FontListBox instance to which this property belongs.

    System.Object baseValue

    New value.

    Returns
    Type Description
    System.Object

    Value that should be set.

    CoerceThemeFontsProperty(DependencyObject, Object)

    Coerces ThemeFonts property. Fulfils the logic before setting the ThemeFonts value.

    Declaration
    public static object CoerceThemeFontsProperty(DependencyObject d, object baseValue)
    Parameters
    Type Name Description
    System.Windows.DependencyObject d

    FontListBox instance to which this property belongs.

    System.Object baseValue

    New value.

    Returns
    Type Description
    System.Object

    Value that should be set.

    OnDisplayFontNamesInSystemFontChanged(DependencyPropertyChangedEventArgs)

    Updates property value cache and raises DisplayFontNamesInSystemFontChanged event.

    Declaration
    protected virtual void OnDisplayFontNamesInSystemFontChanged(DependencyPropertyChangedEventArgs e)
    Parameters
    Type Name Description
    System.Windows.DependencyPropertyChangedEventArgs e

    Property changes details, such as old value and new value.

    OnFocusedFontFamilyChanged(DependencyPropertyChangedEventArgs)

    Updates property value cache and raises FocusedFontFamilyChanged event.

    Declaration
    protected virtual void OnFocusedFontFamilyChanged(DependencyPropertyChangedEventArgs e)
    Parameters
    Type Name Description
    System.Windows.DependencyPropertyChangedEventArgs e

    Property change details, such as old value and new value.

    OnFontsSourceChanged(DependencyPropertyChangedEventArgs)

    Updates property value cache and raises FontsSourceChanged event.

    Declaration
    protected virtual void OnFontsSourceChanged(DependencyPropertyChangedEventArgs e)
    Parameters
    Type Name Description
    System.Windows.DependencyPropertyChangedEventArgs e

    Property changes details, such as old value and new value.

    OnGroupHeaderStyleChanged(DependencyPropertyChangedEventArgs)

    Updates property value cache and raises GroupHeaderStyleChanged event.

    Declaration
    protected virtual void OnGroupHeaderStyleChanged(DependencyPropertyChangedEventArgs e)
    Parameters
    Type Name Description
    System.Windows.DependencyPropertyChangedEventArgs e

    Property changes details, such as old value and new value.

    OnHasFocusChanged(DependencyPropertyChangedEventArgs)

    Updates property value cache and raises HasFocusChanged event.

    Declaration
    protected virtual void OnHasFocusChanged(DependencyPropertyChangedEventArgs e)
    Parameters
    Type Name Description
    System.Windows.DependencyPropertyChangedEventArgs e

    Property changes details, such as old value and new value.

    OnInitialized(EventArgs)

    Raises the System.Windows.FrameworkElement.Initialized event. This method is invoked whenever System.Windows.FrameworkElement.IsInitialized is set to true internally.

    Declaration
    protected override void OnInitialized(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    The System.Windows.RoutedEventArgs that contains the event data.

    OnItemContainerStyleChanged(DependencyPropertyChangedEventArgs)

    Updates property value cache and raises ItemContainerStyleChanged event.

    Declaration
    protected virtual void OnItemContainerStyleChanged(DependencyPropertyChangedEventArgs e)
    Parameters
    Type Name Description
    System.Windows.DependencyPropertyChangedEventArgs e

    Property changes details, such as old value and new value.

    OnItemTemplateChanged(DependencyPropertyChangedEventArgs)

    Updates property value cache and raises ItemTemplateChanged event.

    Declaration
    protected virtual void OnItemTemplateChanged(DependencyPropertyChangedEventArgs e)
    Parameters
    Type Name Description
    System.Windows.DependencyPropertyChangedEventArgs e

    Property changes details, such as old value and new value.

    OnListBoxBackgroundChanged(DependencyPropertyChangedEventArgs)

    Raises OnListBoxBackgroundChanged event.

    Declaration
    protected virtual void OnListBoxBackgroundChanged(DependencyPropertyChangedEventArgs e)
    Parameters
    Type Name Description
    System.Windows.DependencyPropertyChangedEventArgs e

    Property change details, such as old value and new value.

    OnRecentlyUsedFontsChanged(DependencyPropertyChangedEventArgs)

    Updates property value cache and raises RecentlyUsedFontsChanged event.

    Declaration
    protected virtual void OnRecentlyUsedFontsChanged(DependencyPropertyChangedEventArgs e)
    Parameters
    Type Name Description
    System.Windows.DependencyPropertyChangedEventArgs e

    Property changes details, such as old value and new value.

    OnSelectedFontFamilyChanged(DependencyPropertyChangedEventArgs)

    Updates property value cache and raises SelectedFontFamilyChanged event.

    Declaration
    protected virtual void OnSelectedFontFamilyChanged(DependencyPropertyChangedEventArgs e)
    Parameters
    Type Name Description
    System.Windows.DependencyPropertyChangedEventArgs e

    Property changes details, such as old value and new value.

    OnThemeFontsChanged(DependencyPropertyChangedEventArgs)

    Updates property value cache and raises ThemeFontsChanged event.

    Declaration
    protected virtual void OnThemeFontsChanged(DependencyPropertyChangedEventArgs e)
    Parameters
    Type Name Description
    System.Windows.DependencyPropertyChangedEventArgs e

    Property changes details, such as old value and new value.

    Events

    DisplayFontNamesInSystemFontChanged

    Event that is raised when DisplayFontNamesInSystemFont property is changed.

    Declaration
    public event PropertyChangedCallback DisplayFontNamesInSystemFontChanged
    Event Type
    Type Description
    System.Windows.PropertyChangedCallback

    FocusedFontFamilyChanged

    Event that is raised when FocusedFontFamily property is changed.

    Declaration
    public event PropertyChangedCallback FocusedFontFamilyChanged
    Event Type
    Type Description
    System.Windows.PropertyChangedCallback

    FontsSourceChanged

    Event that is raised when FontsSource property is changed.

    Declaration
    public event PropertyChangedCallback FontsSourceChanged
    Event Type
    Type Description
    System.Windows.PropertyChangedCallback

    GroupHeaderStyleChanged

    Event that is raised when GroupHeaderStyle property is changed.

    Declaration
    public event PropertyChangedCallback GroupHeaderStyleChanged
    Event Type
    Type Description
    System.Windows.PropertyChangedCallback

    HasFocusChanged

    Event that is raised when HasFocus property is changed.

    Declaration
    public event PropertyChangedCallback HasFocusChanged
    Event Type
    Type Description
    System.Windows.PropertyChangedCallback

    ItemContainerStyleChanged

    Event that is raised when ItemContainerStyle property is changed.

    Declaration
    public event PropertyChangedCallback ItemContainerStyleChanged
    Event Type
    Type Description
    System.Windows.PropertyChangedCallback

    ItemTemplateChanged

    Event that is raised when ItemTemplate property is changed.

    Declaration
    public event PropertyChangedCallback ItemTemplateChanged
    Event Type
    Type Description
    System.Windows.PropertyChangedCallback

    ListBoxBackgroundChanged

    Event that is raised when ListBoxBackground property is changed.

    Declaration
    public event PropertyChangedCallback ListBoxBackgroundChanged
    Event Type
    Type Description
    System.Windows.PropertyChangedCallback

    RecentlyUsedFontsChanged

    Event that is raised when RecentlyUsedFonts property is changed.

    Declaration
    public event PropertyChangedCallback RecentlyUsedFontsChanged
    Event Type
    Type Description
    System.Windows.PropertyChangedCallback

    SelectedFontFamilyChanged

    Event that is raised when SelectedFontFamily property is changed.

    Declaration
    public event PropertyChangedCallback SelectedFontFamilyChanged
    Event Type
    Type Description
    System.Windows.PropertyChangedCallback

    ThemeFontsChanged

    Event that is raised when ThemeFonts property is changed.

    Declaration
    public event PropertyChangedCallback ThemeFontsChanged
    Event Type
    Type Description
    System.Windows.PropertyChangedCallback
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved