Class FontComboBox
A ComboBox that will show a list of fonts installed in the system.
Inherited Members
Namespace: Syncfusion.Windows.Forms.Tools
Assembly: Syncfusion.Tools.Windows.dll
Syntax
public class FontComboBox : ThemedComboBox, ISupportOffice2007Theme, IThemeProvider, IVisualStyle
Remarks
The Fill() method will let you refill the combo box 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.fontCombo.Text, 10.0);
Constructors
FontComboBox()
Initializes a new instance of the FontComboBox class.
Declaration
public FontComboBox()
Properties
CanApplyTheme
Gets or sets a value indicating whether a SkinManager theme settings can be applied to the control.
Declaration
public bool CanApplyTheme { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | The default value is true. |
Remarks
This property must be initialized before applying the VisualTheme />
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.
ControlName
Gets the name of the control.
Declaration
public string ControlName { get; }
Property Value
| Type |
|---|
| System.String |
DrawMode
Gets a value indicating that elements are drawn manually
Declaration
public DrawMode DrawMode { get; }
Property Value
| Type |
|---|
| System.Windows.Forms.DrawMode |
EnableTouchMode
Declaration
public bool EnableTouchMode { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
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
Gets an object representing the collection of the items contained in control.
Declaration
public ComboBox.ObjectCollection Items { get; }
Property Value
| Type |
|---|
| System.Windows.Forms.ComboBox.ObjectCollection |
ShowSymbolFontPreview
Gets or sets whether symbols can be rendered for the symbol fonts with its font name in the dropdown.
Declaration
public bool ShowSymbolFontPreview { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
ThemeName
Gets or sets the theme name of the control.
Declaration
public string ThemeName { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String | The default value is null. |
Remarks
This ThemeStyle settings will be applied only when the VisualStyleBased theme has been applied to the control.
ThemeStyle
Gets or sets the FontComboBoxVisualStyle value used to customize the appearance of the FontComboBox.
Declaration
public FontComboBoxVisualStyle ThemeStyle { get; set; }
Property Value
| Type |
|---|
| FontComboBoxVisualStyle |
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 auto complete behaviour. This property functions only when the DropDownStyle is set to DropDown.
Declaration
public bool UseAutoComplete { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
VisualStyle
Gets or sets control's visual style.
Declaration
public ThemedComboBoxStyles VisualStyle { get; set; }
Property Value
| Type |
|---|
| ThemedComboBoxStyles |
Methods
ApplyScaleToControl(Single)
Declaration
public void ApplyScaleToControl(float scaleFactor)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Single | scaleFactor |
ArgToRadians(Int64)
Declaration
protected static double ArgToRadians(long arg)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int64 | arg |
Returns
| Type |
|---|
| System.Double |
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 |
Overrides
DrawItemText(DrawItemEventArgs)
Declaration
protected override void DrawItemText(DrawItemEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.DrawItemEventArgs | e |
Overrides
Fill()
Fills the combo box at any time. This will be called automatically in the constructor.
Declaration
public void Fill()
GetActiveThemeName()
Gets the active theme of control.
Declaration
public string GetActiveThemeName()
Returns
| Type |
|---|
| System.String |
OnDropDown(EventArgs)
Raises the System.Windows.Forms.ComboBox.DropDown event and sets DropDown according to ItemWidth.
Declaration
protected override void OnDropDown(EventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.EventArgs | e | An System.EventArgs that contains the event data. |
Overrides
OnDropDownClosed(EventArgs)
Declaration
protected override void OnDropDownClosed(EventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.EventArgs | e |
Overrides
OnFontChanged(EventArgs)
Declaration
protected override void OnFontChanged(EventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.EventArgs | e |
Overrides
OnSizeChanged(EventArgs)
Declaration
protected override void OnSizeChanged(EventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.EventArgs | e |
RaiseThemeChanged(Object, ThemeChangedEventArgs)
Raises the ThemeNameChanged event when theme name changed.
Declaration
protected virtual void RaiseThemeChanged(object sender, ThemeChangedEventArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | sender | The sender value. |
| ThemeChangedEventArgs | args | A ThemeChangedEventArgs contains the event data. |
WndProc(ref Message)
Declaration
protected override void WndProc(ref Message m)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.Message | m |
Overrides
Events
ThemeNameChanged
Occurs when theme name of the control has changed.
Declaration
public event ThemeChangedEventHandler ThemeNameChanged
Event Type
| Type |
|---|
| ThemeChangedEventHandler |
Explicit Interface Implementations
IVisualStyle.VisualTheme
Gets or sets the VisualTheme of the control.
Declaration
string IVisualStyle.VisualTheme { get; set; }
Returns
| Type |
|---|
| System.String |
IThemeProvider.BaseThemeName
Gets or sets the BaseTheme name of the theme
Declaration
string IThemeProvider.BaseThemeName { get; set; }
Returns
| Type |
|---|
| System.String |