Font.WithWeight Method

Definition

Overloads

Name Description
WithWeight(FontWeight)

Returns a new Font with the specified weight.

WithWeight(FontWeight, FontSlant)

Returns a new Font with the specified weight and slant.

WithWeight(FontWeight)

Source:
Font.cs
Source:
Font.cs
Source:
Font.cs
Source:
Font.cs

Returns a new Font with the specified weight.

public:
 Microsoft::Maui::Font WithWeight(Microsoft::Maui::FontWeight weight);
public Microsoft.Maui.Font WithWeight(Microsoft.Maui.FontWeight weight);
member this.WithWeight : Microsoft.Maui.FontWeight -> Microsoft.Maui.Font
Public Function WithWeight (weight As FontWeight) As Font

Parameters

weight
FontWeight

The weight to apply (e.g., Bold, Regular).

Returns

A new font instance with the specified weight.

Applies to

WithWeight(FontWeight, FontSlant)

Source:
Font.cs
Source:
Font.cs
Source:
Font.cs
Source:
Font.cs

Returns a new Font with the specified weight and slant.

public:
 Microsoft::Maui::Font WithWeight(Microsoft::Maui::FontWeight weight, Microsoft::Maui::FontSlant fontSlant);
public Microsoft.Maui.Font WithWeight(Microsoft.Maui.FontWeight weight, Microsoft.Maui.FontSlant fontSlant);
member this.WithWeight : Microsoft.Maui.FontWeight * Microsoft.Maui.FontSlant -> Microsoft.Maui.Font
Public Function WithWeight (weight As FontWeight, fontSlant As FontSlant) As Font

Parameters

weight
FontWeight

The weight to apply.

fontSlant
FontSlant

The slant to apply.

Returns

A new font instance with the specified weight and slant.

Applies to