Class FontListBox
A ListBox that will show a list of fonts installed in the system.
Inheritance
Namespace: Syncfusion.Windows.Forms.Tools
Assembly: Syncfusion.Tools.Windows.dll
Syntax
public class FontListBox : ListBox, IThemeProvider, IVisualStyle
Remarks
The
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 |
---|
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 |
---|
System.Int32 |
DrawMode
Declaration
public DrawMode DrawMode { get; }
Property Value
Type |
---|
System.Windows.Forms.DrawMode |
EnableTouchMode
gets or Sets the touchmode
Declaration
public bool EnableTouchMode { get; set; }
Property Value
Type |
---|
System.Boolean |
Font
Declaration
public Font Font { get; }
Property Value
Type |
---|
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 |
---|
System.Windows.Forms.ListBox.ObjectCollection |
MetroColor
Gets or sets the theme color of the FontListBox
Declaration
public Color MetroColor { get; set; }
Property Value
Type |
---|
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 |
---|
System.Boolean |
ScrollMetroColorTable
Declaration
public MetroColorTable ScrollMetroColorTable { get; set; }
Property Value
Type |
---|
MetroColorTable |
ThemeName
Gets or sets the theme name of the FontListBox control.
Declaration
public string ThemeName { get; set; }
Property Value
Type |
---|
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
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 |
---|
System.Boolean |
VisualStyle
Gets or sets an advanced appearance for the FontListBox
Declaration
public FontListBox.FontListBoxStyle VisualStyle { get; set; }
Property Value
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 |
---|
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 |
---|
System.Boolean |
Events
ThemeNameChanged
Occurs when theme name of the FontListBox has changed.
Declaration
public event ThemeChangedEventHandler ThemeNameChanged
Event Type
Explicit Interface Implementations
IVisualStyle.VisualTheme
Gets or Sets the value for the Skin Manager.
Declaration
string IVisualStyle.VisualTheme { get; set; }
Returns
Type |
---|
System.String |
IThemeProvider.ControlName
Gets the name of the control.
Declaration
string IThemeProvider.ControlName { get; }
Returns
Type |
---|
System.String |