WinForms

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

    A ListBox that will show a list of fonts installed in the system.

    Inheritance
    System.Object
    FontListBox
    Implements
    IThemeProvider
    IVisualStyle
    Namespace: Syncfusion.Windows.Forms.Tools
    Assembly: Syncfusion.Tools.Windows.dll
    Syntax
    public class FontListBox : ListBox, IThemeProvider, IVisualStyle
    Remarks

    The method will let you refill the listbox at any time. This method will be called initially from the constructor.

    You could get the selected Font text and construct a new Font as follows:

    Font newFont = new Font(this.fontListBox.Text, 10.0);

    Constructors

    FontListBox()

    Declaration
    public FontListBox()

    Properties

    BaseThemeName

    Gets or sets the BaseTheme name of the theme

    Declaration
    public string BaseThemeName { get; set; }
    Property Value
    Type Description
    System.String

    CanApplyTheme

    Gets or sets a value indicating whether a SkinManager theme style has been applied to the control.

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

    The default value is true.

    CanOverrideStyle

    Gets or sets a value indicating whether control elements styles can be overridden by theme style settings.

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

    Default value is false.

    Remarks

    By default, the control's element styles will not be overridden by theme style settings if the style is set in sample level. If this property is enabled, element style will be overridden by theme style settings event if it is set in sample level. This property should be enabled or disabled before calling the ThemeName property of the control.

    ColumnWidth

    Declaration
    public int ColumnWidth { get; set; }
    Property Value
    Type Description
    System.Int32

    DrawMode

    Declaration
    public DrawMode DrawMode { get; }
    Property Value
    Type Description
    System.Windows.Forms.DrawMode

    EnableTouchMode

    gets or Sets the touchmode

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

    Font

    Declaration
    public Font Font { get; }
    Property Value
    Type Description
    System.Drawing.Font

    IsVisualStyleEnabled

    Gets a value indicating whether the visual style based theme is applied to the control. This also indicates whether the theme files are referred from external assemblies or not.

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

    Return true, if the visual style based theme is applied to control. Otherwise returns false.

    Items

    Declaration
    public ListBox.ObjectCollection Items { get; }
    Property Value
    Type Description
    System.Windows.Forms.ListBox.ObjectCollection

    MetroColor

    Gets or sets the theme color of the FontListBox

    Declaration
    public Color MetroColor { get; set; }
    Property Value
    Type Description
    System.Drawing.Color

    MultiColumn

    Gets or sets a value indicating whether the control is a multi column control.

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

    ScrollMetroColorTable

    Declaration
    public MetroColorTable ScrollMetroColorTable { get; set; }
    Property Value
    Type Description
    MetroColorTable

    ThemeName

    Gets or sets the theme name of the FontListBox control.

    Declaration
    public string ThemeName { get; set; }
    Property Value
    Type Description
    System.String

    ThemeStyle

    Gets or sets the FontListBoxVisualStyle value used to customize the appearance of the FontListBox.

    Declaration
    public FontListBoxVisualStyle ThemeStyle { get; set; }
    Property Value
    Type Description
    FontListBoxVisualStyle
    Remarks

    This ThemeStyle settings will be applied only when the VisualStyleBased theme has been applied to the control.

    UseAutoComplete

    Gets or sets a value indicating whether the control use auto complete.

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

    VisualStyle

    Gets or sets an advanced appearance for the FontListBox

    Declaration
    public FontListBox.FontListBoxStyle VisualStyle { get; set; }
    Property Value
    Type Description
    FontListBox.FontListBoxStyle

    Methods

    ApplyScaleToControl(Single)

    Applies the scaling

    Declaration
    public void ApplyScaleToControl(float scaleFactor)
    Parameters
    Type Name Description
    System.Single scaleFactor

    CreateAccessibilityInstance()

    Declaration
    protected override AccessibleObject CreateAccessibilityInstance()
    Returns
    Type Description
    System.Windows.Forms.AccessibleObject

    Dispose(Boolean)

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing

    GetActiveThemeName()

    Gets the active theme name of the FontListBox control.

    Declaration
    public string GetActiveThemeName()
    Returns
    Type Description
    System.String

    Returns the active theme name.

    OnDrawItem(DrawItemEventArgs)

    Declaration
    protected override void OnDrawItem(DrawItemEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.DrawItemEventArgs e

    OnFontChanged(EventArgs)

    Font changed

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

    OnLocationChanged(EventArgs)

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

    OnMeasureItem(MeasureItemEventArgs)

    Fills the combo box at any time. This will be called automatically in the constructor.

    Declaration
    protected override void OnMeasureItem(MeasureItemEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.MeasureItemEventArgs e

    OnSelectedIndexChanged(EventArgs)

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

    OnSizeChanged(EventArgs)

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

    ProcessAutoComplete(Keys)

    process auto complete.

    Declaration
    protected virtual bool ProcessAutoComplete(Keys keyData)
    Parameters
    Type Name Description
    System.Windows.Forms.Keys keyData

    Key data

    Returns
    Type Description
    System.Boolean

    Key processed.

    ProcessCmdKey(ref Message, Keys)

    Declaration
    protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
    Parameters
    Type Name Description
    System.Windows.Forms.Message msg
    System.Windows.Forms.Keys keyData
    Returns
    Type Description
    System.Boolean

    Events

    ThemeNameChanged

    Occurs when theme name of the FontListBox has changed.

    Declaration
    public event ThemeChangedEventHandler ThemeNameChanged
    Event Type
    Type Description
    ThemeChangedEventHandler

    Explicit Interface Implementations

    IVisualStyle.VisualTheme

    Gets or Sets the value for the Skin Manager.

    Declaration
    string IVisualStyle.VisualTheme { get; set; }
    Returns
    Type Description
    System.String

    IThemeProvider.ControlName

    Gets the name of the control.

    Declaration
    string IThemeProvider.ControlName { get; }
    Returns
    Type Description
    System.String

    Implements

    IThemeProvider
    IVisualStyle
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved