Table of Contents

Class FontIconExtension

Namespace
Wpf.Ui.Markup
Assembly
Wpf.Ui.dll

Custom MarkupExtension which can provide FontIcon.

public class FontIconExtension : MarkupExtension
Inheritance
FontIconExtension
Inherited Members

Examples

<ui:Button
    Appearance="Primary"
    Content="WPF UI button with font icon"
    Icon="{ui:FontIcon '🌈'}" />
<ui:Button Icon="{ui:FontIcon '&#x1F308;'}" />
<ui:HyperlinkButton Icon="{ui:FontIcon '&#x1F308;'}" />
<ui:TitleBar Icon="{ui:FontIcon '&#x1F308;'}" />

Constructors

FontIconExtension()

public FontIconExtension()

FontIconExtension(string)

public FontIconExtension(string glyph)

Parameters

glyph string

Properties

FontFamily

[ConstructorArgument("fontFamily")]
public FontFamily FontFamily { get; set; }

Property Value

FontFamily

FontSize

public double FontSize { get; set; }

Property Value

double

Glyph

[ConstructorArgument("glyph")]
public string? Glyph { get; set; }

Property Value

string

Methods

ProvideValue(IServiceProvider)

When implemented in a derived class, returns an object that is provided as the value of the target property for this markup extension.

public override object ProvideValue(IServiceProvider serviceProvider)

Parameters

serviceProvider IServiceProvider

A service provider helper that can provide services for the markup extension.

Returns

object

The object value to set on the property where the extension is applied.