Class RadFontPopupEditorElement
Inheritance
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll
Syntax
public class RadFontPopupEditorElement : RadPopupEditorElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IComponent, IDisposable, IBindableComponent, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IInputEditor, IValueEditor, ISupportInitialize
Constructors
RadFontPopupEditorElement()
Declaration
public RadFontPopupEditorElement()
Fields
fonts
Declaration
protected Dictionary<string, Font> fonts
Field Value
|
System.Collections.Generic.Dictionary<System.String, System.Drawing.Font>
|
isPopulating
Declaration
protected bool isPopulating
Field Value
|
System.Boolean
|
Properties
AllFontsItemText
Allows you to localize the text of the All Fonts group.
Declaration
public string AllFontsItemText { get; set; }
Property Value
|
System.String
|
FontListView
Returns the underlying RadListView control.
Declaration
public RadListView FontListView { get; }
Property Value
|
RadListView
|
FontNames
Returns a list that contains all system fonts.
Declaration
public List<string> FontNames { get; }
Property Value
|
System.Collections.Generic.List<System.String>
|
PreviewFont
Gets the hovered font when the drop down is opened.
Declaration
public string PreviewFont { get; }
Property Value
|
System.String
|
RecentlyUsedItemsCount
Gets or sets the count of the items in the recently used fonts section.
Declaration
public int RecentlyUsedItemsCount { get; set; }
Property Value
|
System.Int32
|
RecentlyUsedItemText
Allows you to localize the text of the Recently Used Fonts group.
Declaration
public string RecentlyUsedItemText { get; set; }
Property Value
|
System.String
|
SelectedFont
Gets or sets the Selected font name.
Declaration
public string SelectedFont { get; set; }
Property Value
|
System.String
|
SelectOnHover
Enable or disables the preview font functionality.
Declaration
public bool SelectOnHover { get; set; }
Property Value
|
System.Boolean
|
ShowRecentlyUsedFonts
Gets or sets the visibility of the Recently Used Fonts section.
Declaration
public bool ShowRecentlyUsedFonts { get; set; }
Property Value
|
System.Boolean
|
ThemeEffectiveType
Declaration
protected override Type ThemeEffectiveType { get; }
Property Value
|
System.Type
|
Overrides
Methods
AddFont(FontFamily)
By default the control loads the fonts according to the font families exposed by the InstalledFontCollection class. This method can be used to add other fonts, including such not installed on the machine.
Declaration
public virtual void AddFont(FontFamily fontFamily)
Parameters
|
System.Drawing.FontFamily
fontFamily
The font to be added. |
AddFont(String)
Adds a font according to the provided family name. The ThemeResolutionService class will be also checked for any loaded custom fonts matching the font name.
Declaration
public virtual void AddFont(string fontFamilyName)
Parameters
|
System.String
fontFamilyName
The font to be added. |
ApplyThemeToPopup(RadPopupControlBase)
Declaration
protected override void ApplyThemeToPopup(RadPopupControlBase popup)
Parameters
|
RadPopupControlBase
popup
|
Overrides
CreatePopupForm()
Declaration
protected override RadPopupControlBase CreatePopupForm()
Returns
|
RadPopupControlBase
|
Overrides
OnPreviewFontChanged(Object, SelectedFontEventArgs)
Declaration
protected virtual void OnPreviewFontChanged(object sender, SelectedFontEventArgs e)
Parameters
|
System.Object
sender
|
|
SelectedFontEventArgs
e
|
OnSelctedFontChanged(Object, SelectedFontEventArgs)
Declaration
protected virtual void OnSelctedFontChanged(object sender, SelectedFontEventArgs e)
Parameters
|
System.Object
sender
|
|
SelectedFontEventArgs
e
|
PopulateFonts()
Declaration
protected virtual void PopulateFonts()
RemoveFont(FontFamily)
Removes the specified font from the font collection used by the control.
Declaration
public virtual void RemoveFont(FontFamily fontFamily)
Parameters
|
System.Drawing.FontFamily
fontFamily
The font to be removed. |
RemoveFont(String)
Removes the font with the specified name from the font collection used by the control.
Declaration
public virtual void RemoveFont(string fontFamilyName)
Parameters
|
System.String
fontFamilyName
The family name of the font to be removed. |
UpdateRecentlyUsedFonts(String[], Boolean)
Allows you to manully update the recently used fonts list.
Declaration
public void UpdateRecentlyUsedFonts(string[] newFonts, bool clear = false)
Parameters
|
System.String[]
newFonts
The array where the new fonts are. |
|
System.Boolean
clear
Clears the current list prior adding the new fonts. |
Events
PreviewFontChanged
Fires when the hovered font is changed.
Declaration
public event SelectedFontEventHandler PreviewFontChanged
Event Type
|
SelectedFontEventHandler
|
SelectedFontChanged
Fires when the selected font is changed.
Declaration
public event SelectedFontEventHandler SelectedFontChanged
Event Type
|
SelectedFontEventHandler
|