Skip to main content

ToolbarText Class

A non-clickable text item within DXToolbar.

Namespace: DevExpress.Maui.Controls

Assembly: DevExpress.Maui.Controls.dll

NuGet Package: DevExpress.Maui.Controls

Declaration

public class ToolbarText :
    ToolbarCustomItem

Remarks

Add ToolbarText to DXToolbar

The following code sample displays a ToolbarText item within a DXToolbar control:

MAUI Toolbar ToolbarText

<ContentPage ...
    xmlns:dxc="clr-namespace:DevExpress.Maui.Controls;assembly=DevExpress.Maui.Controls">
    <Grid>
        <dxc:DXToolbar>
            <!-- ... -->
            <dxc:ToolbarText Content="Layout"/>
            <!-- ... -->
        </dxc:DXToolbar>
    </Grid>
</ContentPage>

Handle Loading

You can use the following inherited member to handle the ToolbarText loading:

Property Description
IsLoaded Gets or sets whether a DXElementBase descendant is loaded.
Loaded Fires when the DXElementBase descendant is loaded.
Unloaded Fires when the DXElementBase descendant is unloaded.

Customize Appearance

You can use the following properties to customize common ToolbarText appearance settings:

Property Description
CornerRadius Gets or sets a ToolbarContentItemBase descendant’s corner radius. This is a bindable property.
Margin Gets or sets the margin value of a ToolbarContentItemBase descendant. This is a bindable property.
Padding Gets or sets the padding of a ToolbarContentItemBase descendant. This is a bindable property.
ShowContent Gets or sets whether a ToolbarContentItemBase descendant’s content is displayed. This is a bindable property.
Content Gets or sets the custom content of the toolbar button. This is a bindable property.
ContentTemplate Gets or sets a template that configures the content‘s appearance. This is a bindable property.
ViewStyle Gets or sets the style applied to content within a ToolbarContentItemBase descendant. This is a bindable property.
Style Gets or sets the style applied to a DXElementBase descendant. This is a bindable property.

Size and Alignment

You can use the following properties to customize common ToolbarText size and alignment settings:

Property Description
HeightRequest Gets or sets height of a ToolbarContentItemBase descendant. This is a bindable property.
MaximumHeightRequest Gets or sets maximum height of a ToolbarContentItemBase descendant. This is a bindable property.
MinimumHeightRequest Gets or sets minimum height of a ToolbarContentItemBase descendant. This is a bindable property.
WidthRequest Gets or sets width of a ToolbarContentItemBase descendant. This is a bindable property.
MaximumWidthRequest Gets or sets maximum width of a ToolbarContentItemBase descendant. This is a bindable property.
MinimumWidthRequest Gets or sets minimum width of a ToolbarContentItemBase descendant. This is a bindable property.
HorizontalOptions Gets or sets the horizontal alignment of a ToolbarContentItemBase descendant. This is a bindable property.
HorizontalContentAlignment Gets or sets the horizontal alignment of a ToolbarContentItemBase descendant’s content. This is a bindable property.
VerticalOptions Gets or sets the vertical alignment of a ToolbarContentItemBase descendant. This is a bindable property.
VerticalContentAlignment Gets or sets the vertical alignment of a ToolbarContentItemBase descendant’s content. This is a bindable property.

Background Color

You can use the BackgroundColor property to customize a ToolbarText background color.

Border

You can use the following properties to customize a ToolbarText border:

Property Description
BorderColor Gets or sets a ToolbarContentItemBase descendant’s border color. This is a bindable property.
BorderThickness Gets or sets a ToolbarContentItemBase descendant’s border thickness. This is a bindable property.

Icon

You can use the following properties to display and customize a ToolbarText icon:

Property Description
Icon Gets or sets the icon that is displayed within a ToolbarContentItemBase descendant. This is a bindable property.
ShowIcon Gets or sets whether a ToolbarContentItemBase descendant’s icon is displayed. This is a bindable property.
IconAspect Gets or sets the aspect of the icon that is displayed within a ToolbarContentItemBase descendant. This is a bindable property.
IconHeight Gets or sets the icon height of a ToolbarContentItemBase descendant. This is a bindable property.
IconWidth Gets or sets the icon width of a ToolbarContentItemBase descendant. This is a bindable property.
IconPlacement Gets or sets the icon placement within a ToolbarContentItemBase descendant. This is a bindable property.
IconIndent Gets or sets the icon indent of a ToolbarContentItemBase descendant. This is a bindable property.
IconColorizationEnabled Gets or sets whether the toolbar item’s icon should change its colors in pressed and disabled states. This is a bindable property.
IconColor Gets or sets the icon color of a ToolbarContentItemBase descendant. This is a bindable property.

Text and Font Settings

You can use the following properties to display and customize a ToolbarText font settings:

Property Description
FontAttributes Gets or sets a ToolbarContentItemBase descendant’s font attributes. This is a bindable property.
FontFamily Gets or sets a ToolbarContentItemBase descendant’s font family. This is a bindable property.
FontSize Gets or sets a ToolbarContentItemBase descendant’s font size. This is a bindable property.
FontAutoScalingEnabled Gets or sets whether the toolbar item’s text is scaled according to the operating system’s text scale setting. This is a bindable property.
TextColor Gets or sets the text color of a ToolbarContentItemBase descendant. This is a bindable property.
TextCharacterSpacing Gets or sets the spacing between characters of a ToolbarContentItemBase descendant’s text. This is a bindable property.
TextDecorations Gets or sets text decorations applied to a ToolbarContentItemBase descendant’s text. This is a bindable property.
TextHorizontalAlignment Gets or sets the horizontal alignment applied to a ToolbarContentItemBase descendant’s text. This is a bindable property.
TextVerticalAlignment Gets or sets the vertical alignment applied to a ToolbarContentItemBase descendant’s text. This is a bindable property.
TextLineBreakMode Gets or sets the line breaking mode for a ToolbarContentItemBase descendant’s text. This is a bindable property.
TextLineHeight Gets or sets line height applied to a ToolbarContentItemBase descendant’s text. This is a bindable property.
TextMaxLines Gets or sets the maximum number of a ToolbarContentItemBase descendant’s text. This is a bindable property.

Inheritance

System.Object
See Also