Skip to main content

EditBase.BottomTextFontFamily Property

Gets or sets the font family name for the editor’s help and error text.

Namespace: DevExpress.XamarinForms.Editors

Assembly: DevExpress.XamarinForms.Editors.dll

NuGet Package: DevExpress.XamarinForms.Editors

Declaration

public string BottomTextFontFamily { get; set; }

Property Value

Type Description
String

The font family name.

Remarks

You can display HelpText or ErrorText (if the HasError property is true) below an editor. Note that changes to the BottomTextFontFamily property affect both HelpText and ErrorText.

To apply a custom font, add the font file to your solution, and then assign it to the editor’s BottomTextFontFamily property.

This example shows how to apply the Verdana font.

  1. Add the font file to your platform-specific projects:

    • Android
      Add the font file to the Android project’s Assets folder and set Build Action: AndroidAsset.
    • iOS
      Add the font file to the iOS project’s Resources folder,
      set Build Action: BundleResource,
      and add the font file name to the Info.plist file (the UIAppFonts key in Visual Studio, or the Fonts provided by application property in Visual Studio for Mac).
  2. In the App.xaml file, add the following lines to the ResourceDictionary section:

    <OnPlatform x:TypeArguments="x:String" x:Key="Verdana">
      <On Platform="Android" Value="verdana.ttf#Verdana"/>
      <On Platform="iOS" Value="Verdana"/>
    </OnPlatform>
    
  3. Set the BottomTextFontFamily property to the key defined for the custom font:

      <dxe:TextEdit BottomTextFontFamily="{StaticResource Verdana}" />
    

Note

The BottomTextFontAttributes property affects the default font only. If you need to apply a bold or an italic custom font, use the corresponding font style file as described above.

You can also use the following properties to configure the help/error text appearance in different states:

Property

Description

BottomTextFontAttributes
BottomTextFontSize

Configure the font settings for text displayed below the editor.

HelpTextColor
DisabledHelpTextColor

Specify the help text color for different states of an editor.

ErrorColor

Specifies the error message text color.

ReserveBottomTextLine

Specifies whether to reserve a line to display error text.

BottomTextTopIndent

Sets the distance between the editor’s help or error text and its bottom border.

See Also