ClassRadGlyphExtension
Provides a MarkupExtension for rendering glyphs using customizable fonts, sizes, and colors in a WPF application. This class allows the user to set default font properties and provides methods to obtain glyph images or geometries based on specified parameters. It supports dynamic changes to the glyph's size, foreground color, and font name, while ensuring that appropriate validation is in place for input values. The glyph can be rendered as either an image or a path based on the target property type. Default values for the font name and size are provided, making the extension easy to use in various contexts.
Definition
Namespace:Telerik.Windows.Controls
Assembly:Telerik.Windows.Controls.dll
Syntax:
public class RadGlyphExtension : MarkupExtension
Inheritance: objectRadGlyphExtension
Constructors
RadGlyphExtension()
Declaration
public RadGlyphExtension()
Properties
Font
Gets or sets the name of the registered font to be used. Default value is TelerikWebUI.
Foreground
Gets or sets the color to be used when creating the glyph. Default value is black.
Declaration
public Brush Foreground { get; set; }
Property Value
Brush
Glyph
Gets or sets the glyph to be used.
Size
Gets or sets the size of the glyph to be used. Default value is 16d.
Type
Gets or sets explicitly the GlyphExportType.
Declaration
public GlyphExportType Type { get; set; }
Property Value
Methods
GetDefaultFont()
Gets the default font name to be used when rendering glyphs.
GetDefaultFontSize()
Gets the default font size to be used when rendering glyphs.
ProvideValue(IServiceProvider)
Declaration
public override object ProvideValue(IServiceProvider serviceProvider)
Parameters
serviceProvider
Returns
SetDefaultFont(string)
Sets the default font name to be used when rendering glyphs.
Declaration
public static void SetDefaultFont(string fontName)
Parameters
fontName
SetDefaultFontSize(double)
Sets the default font size to be used when rendering glyphs.
Declaration
public static void SetDefaultFontSize(double fontSize)
Parameters
fontSize