FontIconSource.FontSize Property

Definition

Gets or sets the size of the icon glyph.

This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).

public:
 property double FontSize { double get(); void set(double value); };
double FontSize();

void FontSize(double value);
/// [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="20.0")]
/// [get: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="20.0")]
/// [set: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="20.0")]
double FontSize();

void FontSize(double value);
/// [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="20.0")]
/// [get: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="20.0")]
/// [set: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="20.0")]
/// [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
/// [get: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
/// [set: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
double FontSize();

void FontSize(double value);
public double FontSize { get; set; }
[Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="20.0")]
public double FontSize { [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="20.0")] get; [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="20.0")] set; }
[Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="20.0")]
[Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
public double FontSize { [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="20.0")] [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)] get; [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="20.0")] [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)] set; }
Public Property FontSize As Double
<FontIconSource FontSize="double" .../>

Property Value

Double

double

A non-negative value that specifies the font size, measured in pixels.

Attributes
Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValueAttribute Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallbackAttribute

Remarks

The unit measure for FontSize is pixels, measuring the line height of the characters in the font. The apparent size of text in the UI can vary based on the current scaling. If you want to use different FontSize values for different scalings, you can do this using the resources system.

Applies to