RadGlyph
Represents a glyph element in the Telerik UI for WPF framework. The RadGlyph class is designed for rendering text-based icons or symbols both at runtime and design time. It includes properties to customize the glyph's appearance, such as Glyph, Foreground, Background, and FontSize. The class also supports theming through the IThemable interface, allowing it to adapt its style according to the active theme. The glyph can be used to create visually rich user interfaces, providing flexibility in customizing icons within WPF applications.
Definition
Namespace:Telerik.Windows.Controls
Assembly:Telerik.Windows.Controls.dll
Syntax:
public class RadGlyph : FrameworkElement
Inheritance: objectRadGlyph
Constructors
public RadGlyph()
Fields
BackgroundProperty
DependencyProperty
Identifies the Background dependency property.
public static readonly DependencyProperty BackgroundProperty
FontProperty
DependencyProperty
Identifies the Font dependency property.
public static readonly DependencyProperty FontProperty
FontSizeProperty
DependencyProperty
Identifies the FontSize dependency property.
public static readonly DependencyProperty FontSizeProperty
ForegroundProperty
DependencyProperty
Identifies the Foreground dependency property.
public static readonly DependencyProperty ForegroundProperty
GlyphProperty
DependencyProperty
Identifies the Glyph dependency property.
public static readonly DependencyProperty GlyphProperty
Properties
Background
Brush
Gets or sets the background of the element.
[Bindable(true)]
public Brush Background { get; set; }
Gets or sets the font size of the element.
[TypeConverter(typeof(FontSizeConverter))]
[Bindable(true)]
public double FontSize { get; set; }
Foreground
Brush
Gets or sets the foreground of the element which would color the rendered glyph.
[Bindable(true)]
public Brush Foreground { get; set; }
TelerikFluentIconsFontFamily
FontFamily
Identifies the TelerikFontFamily property.
public static FontFamily TelerikFluentIconsFontFamily { get; }
TelerikFontFamily
FontFamily
Identifies the TelerikFontFamily property.
public static FontFamily TelerikFontFamily { get; }
Methods
protected override Size ArrangeOverride(Size finalSize)
Size
GetGeometry(string, string)
Geometry
Gets an ImageSource for the chosen glyph.
public static ImageSource GetImageSource(string glyph, double fontSize, Brush foreground, string fontName)
The glyph string.
fontSizedoubleThe font size.
foregroundBrushThe color to render the glyph with.
fontNamestringThe registered font family name to be used.
Returns:ImageSource
Gets a list of all the registered fonts.
GetTypeface(string)
Typeface
Gets the of a registered font.
public static Typeface GetTypeface(string fontName)
The name of the font.
Returns:Typeface
Registers an old version of font family to be used by all instances of RadGlyph.
public static void LoadLegacyFont()
protected override Size MeasureOverride(Size availableSize)
Size
OnCreateAutomationPeer()
AutomationPeer
Creates a RadGlyphAutomationPeer.
protected override AutomationPeer OnCreateAutomationPeer()
AutomationPeer
Renders the formatted glyph.
protected override void OnRender(DrawingContext drawingContext)
Registers a font family to be used by all instances of RadGlyph and RadGlyphExtension.
public static void RegisterFont(FontFamily fontFamily, string fontName)
Registers a font family to be used by all instances of RadGlyph and RadGlyphExtension.
public static void RegisterFont(FontFamily fontFamily)
Registers a font family to be used by all instances of RadGlyph and RadGlyphExtension.
Registers a font family to be used by all instances of RadGlyph and RadGlyphExtension.
public static void RegisterFont(Uri fontUri, string fontName)
Resets the theme in StyleManager scenario.
public void ResetTheme()
Sets the default style key for StyleManager based on the current theme.
protected virtual void SetDefaultStyleKey()