Class FontIconExtension
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 '🌈'}" />
<ui:HyperlinkButton Icon="{ui:FontIcon '🌈'}" />
<ui:TitleBar Icon="{ui:FontIcon '🌈'}" />
Constructors
FontIconExtension()
public FontIconExtension()
FontIconExtension(string)
public FontIconExtension(string glyph)
Parameters
glyph
string
Properties
FontFamily
[ConstructorArgument("fontFamily")]
public FontFamily FontFamily { get; set; }
Property Value
FontSize
public double FontSize { get; set; }
Property Value
Glyph
[ConstructorArgument("glyph")]
public string? Glyph { get; set; }
Property Value
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
IServiceProviderA 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.