Back to Devexpress

FormItemBase.TextFontAttributes Property

maui-devexpress-dot-maui-dot-editors-dot-formitembase-7c4a2176.md

latest1.8 KB
Original Source

FormItemBase.TextFontAttributes Property

Gets or sets the font style that the form item applies to its Text. This is a bindable property.

Namespace : DevExpress.Maui.Editors

Assembly : DevExpress.Maui.Editors.dll

NuGet Package : DevExpress.Maui.Editors

Declaration

csharp
public FontAttributes TextFontAttributes { get; set; }

Property Value

TypeDefaultDescription
FontAttributesNone

The font attributes.

|

Remarks

The TextFontAttributes property affects the default font only. If you need to apply a bold or italic custom font to the text, add the corresponding font style file to your solution and assign that font to the editor’s TextFontFamily property. Refer to the following page for more information: Fonts in .NET MAUI

Example

The markup below adds a text header to a form item and specifies text settings:

xaml
<dxe:FormItem Text="Brightness level"
              TextColor="Gray"
              TextFontAttributes="Bold"
              TextFontFamily="OpenSansRegular"
              TextFontSize="18"
              TextLineBreakMode="CharacterWrap"
              TextMargin="4"
              TextMaxLineCount="2"/>

See Also

FormItemBase Class

FormItemBase Members

DevExpress.Maui.Editors Namespace