Expand Minimize

Control.FontSize property

Applies to Windows and Windows Phone

Gets or sets the size of the text in this control.

Syntax


public double FontSize { get; set; }


<control FontSize="double"/>

Property value

Type: System.Double [.NET] | float64 [C++]

The size of the text in the Control, in pixels.

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.

The default value of FontSize is 11.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml.Controls
Windows::UI::Xaml::Controls [C++]

Metadata

Windows.winmd

See also

Control
Guidelines for scaling to pixel density
Quickstart: Displaying text

 

 

Show:
© 2014 Microsoft