Share via


Font(String, Int32, FontStyleType) Constructor

Definition

Initializes a new instance of the Font struct with the specified name, weight, and style.

public Font(string name, int weight = 400, Microsoft.Maui.Graphics.FontStyleType styleType = Microsoft.Maui.Graphics.FontStyleType.Normal);
new Microsoft.Maui.Graphics.Font : string * int * Microsoft.Maui.Graphics.FontStyleType -> Microsoft.Maui.Graphics.Font
Public Sub New (name As String, Optional weight As Integer = 400, Optional styleType As FontStyleType = Microsoft.Maui.Graphics.FontStyleType.Normal)

Parameters

name
String

The font name or family.

weight
Int32

The font weight (default is Normal).

styleType
FontStyleType

The font style type (default is Normal).

Applies to