Class LabelStyle
Represents the style for hint text, error text, and helper text label elements in the SfTextInputLayout control. Provides customizable properties for text appearance.
Inheritance
Namespace: Syncfusion.Maui.Toolkit.TextInputLayout
Assembly: Syncfusion.Maui.Toolkit.dll
Syntax
public class LabelStyle : Element, ITextElement
  Constructors
LabelStyle()
Declaration
public LabelStyle()
  Fields
FontAttributesProperty
Identifies the FontAttributes bindable property.
Declaration
public static readonly BindableProperty FontAttributesProperty
  Field Value
| Type | 
|---|
| Microsoft.Maui.Controls.BindableProperty | 
Remarks
The FontAttributes property specifies the font attributes for the text in the SfTextInputLayout.
FontAutoScalingEnabledProperty
Identifies the FontAutoScalingEnabled bindable property.
Declaration
public static readonly BindableProperty FontAutoScalingEnabledProperty
  Field Value
| Type | 
|---|
| Microsoft.Maui.Controls.BindableProperty | 
Remarks
The FontAutoScalingEnabled property determines whether automatic font scaling is enabled in the SfTextInputLayout.
FontFamilyProperty
Identifies the FontFamily bindable property.
Declaration
public static readonly BindableProperty FontFamilyProperty
  Field Value
| Type | 
|---|
| Microsoft.Maui.Controls.BindableProperty | 
Remarks
The FontFamily property specifies the font family for the text in the SfTextInputLayout.
FontSizeProperty
Identifies the FontSize bindable property.
Declaration
public static readonly BindableProperty FontSizeProperty
  Field Value
| Type | 
|---|
| Microsoft.Maui.Controls.BindableProperty | 
Remarks
The FontSize property determines the font size of the SfTextInputLayout.
TextColorProperty
Identifies the TextColor bindable property.
Declaration
public static readonly BindableProperty TextColorProperty
  Field Value
| Type | 
|---|
| Microsoft.Maui.Controls.BindableProperty | 
Remarks
The TextColor property determines the color of the text in SfTextInputLayout.
Properties
FontAttributes
Gets or sets the font attributes for the label.
Declaration
public FontAttributes FontAttributes { get; set; }
  Property Value
| Type | 
|---|
| Microsoft.Maui.Controls.FontAttributes | 
Examples
The following code demonstrates how to use the FontAttributes property in the SfTextInputLayout.
<inputLayout:SfTextInputLayout x:Name="textInput"
                               Hint="Name">
 <inputLayout:SfTextInputLayout.HintLabelStyle>
   <inputLayout:LabelStyle FontAttributes="Italic" />
</inputLayout:SfTextInputLayout.HintLabelStyle>
    <Entry />
</inputLayout:SfTextInputLayout>
FontAutoScalingEnabled
Gets or sets whether automatic font scaling is enabled.
Declaration
public bool FontAutoScalingEnabled { get; set; }
  Property Value
| Type | 
|---|
| System.Boolean | 
Examples
The following code demonstrates how to use the FontAutoScalingEnabled property in the SfTextInputLayout.
<inputLayout:SfTextInputLayout x:Name="textInput"
                               Hint="Name">
 <inputLayout:SfTextInputLayout.HintLabelStyle>
   <inputLayout:LabelStyle FontAutoScalingEnabled="True" />
</inputLayout:SfTextInputLayout.HintLabelStyle>
    <Entry />
</inputLayout:SfTextInputLayout>
FontFamily
Gets or sets the font family for the label.
Declaration
public string FontFamily { get; set; }
  Property Value
| Type | 
|---|
| System.String | 
Examples
The following code demonstrates how to use the FontFamily property in the SfTextInputLayout.
<inputLayout:SfTextInputLayout x:Name="textInput"
                               Hint="Name">
 <inputLayout:SfTextInputLayout.HintLabelStyle>
   <inputLayout:LabelStyle FontFamily="Lobster-Regular" />
</inputLayout:SfTextInputLayout.HintLabelStyle>
    <Entry />
</inputLayout:SfTextInputLayout>
FontSize
Gets or sets the font size for the label.
Declaration
public double FontSize { get; set; }
  Property Value
| Type | 
|---|
| System.Double | 
Examples
The following code demonstrates how to use the FontSize property in the SfTextInputLayout.
<inputLayout:SfTextInputLayout x:Name="textInput"
                               Hint="Name">
 <inputLayout:SfTextInputLayout.HintLabelStyle>
   <inputLayout:LabelStyle FontSize="25" />
</inputLayout:SfTextInputLayout.HintLabelStyle>
    <Entry />
</inputLayout:SfTextInputLayout>
TextColor
Gets or sets the text color for the label.
Declaration
public Color TextColor { get; set; }
  Property Value
| Type | 
|---|
| Microsoft.Maui.Graphics.Color | 
Examples
The following code demonstrates how to use the TextColor property in the SfTextInputLayout.