Class RadFontDropDownList
Represents a font dropdown list control that allows users to select fonts from a predefined list of installed fonts. Provides functionality for displaying, selecting, and previewing fonts.
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll
Syntax
[TelerikToolboxCategory("Editors")]
public class RadFontDropDownList : RadPopupEditor, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IPCHost, IAnalyticsProvider
Constructors
RadFontDropDownList()
Initializes a new instance of the RadFontDropDownList class with default settings. Creates a dropdown list populated with available system fonts.
Declaration
public RadFontDropDownList()
Properties
AssociatedControl
This property is not relevant for this class.
Declaration
public override RadPopupContainer AssociatedControl { get; }
Property Value
RadPopupContainer
|
Overrides
FontListView
Gets the underlying RadListView control that displays the list of fonts. This provides access to the view for advanced customization.
Declaration
public RadListView FontListView { get; }
Property Value
RadListView
|
PreviewFont
Gets the name of the font currently being hovered over in the dropdown list. This value changes as the user moves the mouse over different font options when the dropdown is open.
Declaration
public string PreviewFont { get; }
Property Value
System.String
|
RecentlyUsedItemsCount
Gets or sets the maximum number of fonts to display in the Recently Used Fonts group. This determines how many previously selected fonts will be remembered and shown at the top of the list.
Declaration
public int RecentlyUsedItemsCount { get; set; }
Property Value
System.Int32
|
SelectedFont
Gets or sets the name of the currently selected font in the dropdown list. Setting this property will update the display and trigger the SelectedFontChanged event.
Declaration
public string SelectedFont { get; set; }
Property Value
System.String
|
SelectOnHover
Gets or sets a value indicating whether the font preview changes as the user hovers over different font options. When enabled, hovering over a font in the dropdown list will temporarily select it for preview.
Declaration
public bool SelectOnHover { get; set; }
Property Value
System.Boolean
|
ShowRecentlyUsedFonts
Gets or sets a value indicating whether the Recently Used Fonts group is displayed in the dropdown list. When true, fonts that have been previously selected will appear in a separate group at the top of the list.
Declaration
public bool ShowRecentlyUsedFonts { get; set; }
Property Value
System.Boolean
|
ThemeClassName
Gets the theme class name used for styling this control.
Declaration
public override string ThemeClassName { get; }
Property Value
System.String
The fully qualified name of the RadDropDownList type. |
Overrides
Methods
AddFont(FontFamily)
Adds a font family to the list of available fonts in the dropdown.
Declaration
public virtual void AddFont(FontFamily fontFamily)
Parameters
System.Drawing.FontFamily
fontFamily
The System.Drawing.FontFamily to add to the font list. |
AddFont(String)
Adds a font family to the list of available fonts in the dropdown by specifying its name.
Declaration
public virtual void AddFont(string fontFamilyName)
Parameters
System.String
fontFamilyName
The name of the font family to add to the font list. |
CreateElement()
Creates the editor element used by this control.
Declaration
protected override RadPopupEditorElement CreateElement()
Returns
RadPopupEditorElement
A new instance of RadFontPopupEditorElement. |
Overrides
RemoveFont(FontFamily)
Removes a font family from the list of available fonts in the dropdown.
Declaration
public virtual void RemoveFont(FontFamily fontFamily)
Parameters
System.Drawing.FontFamily
fontFamily
The System.Drawing.FontFamily to remove from the font list. |
RemoveFont(String)
Removes a font family from the list of available fonts in the dropdown by specifying its name.
Declaration
public virtual void RemoveFont(string fontFamilyName)
Parameters
System.String
fontFamilyName
The name of the font family to remove from the font list. |
SetAssociatedControlRuntime(RadPopupContainer)
This method is not relevant for this class.
Declaration
public override void SetAssociatedControlRuntime(RadPopupContainer associatedControl)
Parameters
RadPopupContainer
associatedControl
The associated control to set. |
Overrides
Events
PreviewFontChanged
Occurs when the user hovers over a different font in the dropdown list, changing the preview font. This event is only raised when the SelectOnHover property is set to true.
Declaration
public event SelectedFontEventHandler PreviewFontChanged
Event Type
SelectedFontEventHandler
|
SelectedFontChanged
Occurs when the selected font in the dropdown list changes, either through user interaction or programmatically.
Declaration
public event SelectedFontEventHandler SelectedFontChanged
Event Type
SelectedFontEventHandler
|