Class
RadGlyphExtension

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:

cs-api-definition
public class RadGlyphExtension : MarkupExtension

Inheritance: objectRadGlyphExtension

Constructors

RadGlyphExtension()

Declaration

cs-api-definition
public RadGlyphExtension()

Properties

Font

Gets or sets the name of the registered font to be used. Default value is TelerikWebUI.

Declaration

cs-api-definition
public string Font { get; set; }

Property Value

string

Foreground

Gets or sets the color to be used when creating the glyph. Default value is black.

Declaration

cs-api-definition
public Brush Foreground { get; set; }

Property Value

Brush

Glyph

Gets or sets the glyph to be used.

Declaration

cs-api-definition
public object Glyph { get; set; }

Property Value

object

Size

Gets or sets the size of the glyph to be used. Default value is 16d.

Declaration

cs-api-definition
public double Size { get; set; }

Property Value

double

Type

Gets or sets explicitly the GlyphExportType.

Declaration

cs-api-definition
public GlyphExportType Type { get; set; }

Property Value

GlyphExportType

Methods

GetDefaultFont()

Gets the default font name to be used when rendering glyphs.

Declaration

cs-api-definition
public static string GetDefaultFont()

Returns

string

GetDefaultFontSize()

Gets the default font size to be used when rendering glyphs.

Declaration

cs-api-definition
public static double GetDefaultFontSize()

Returns

double

ProvideValue(IServiceProvider)

Declaration

cs-api-definition
public override object ProvideValue(IServiceProvider serviceProvider)

Parameters

serviceProvider

IServiceProvider

Returns

object

SetDefaultFont(string)

Sets the default font name to be used when rendering glyphs.

Declaration

cs-api-definition
public static void SetDefaultFont(string fontName)

Parameters

fontName

string

SetDefaultFontSize(double)

Sets the default font size to be used when rendering glyphs.

Declaration

cs-api-definition
public static void SetDefaultFontSize(double fontSize)

Parameters

fontSize

double