New to Telerik UI for WPFStart a free 30-day trial

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:

C#
public class RadGlyphExtension : MarkupExtension

Inheritance: objectRadGlyphExtension

Constructors

C#
public RadGlyphExtension()

Properties

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

C#
public string Font { get; set; }

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

C#
public Brush Foreground { get; set; }

Gets or sets the glyph to be used.

C#
public object Glyph { get; set; }

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

C#
public double Size { get; set; }

Gets or sets explicitly the GlyphExportType.

C#
public GlyphExportType Type { get; set; }

Methods

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

C#
public static string GetDefaultFont()
Returns:

string

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

C#
public static double GetDefaultFontSize()
Returns:

double

C#
public override object ProvideValue(IServiceProvider serviceProvider)
Parameters:serviceProviderIServiceProviderReturns:

object

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

C#
public static void SetDefaultFont(string fontName)
Parameters:fontNamestring

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

C#
public static void SetDefaultFontSize(double fontSize)
Parameters:fontSizedouble