ToolbarCustomItem Class
An item within a DXToolbar that serves as a container for custom objects.
Namespace: DevExpress.Maui.Controls
Assembly: DevExpress.Maui.Controls.dll
NuGet Package: DevExpress.Maui.Controls
#Declaration
public class ToolbarCustomItem :
ToolbarContentItemBase
#Remarks
#Add ToolbarCustomItem to DXToolbar
The following code sample displays a ToolbarCustomItem item that contains a CheckEdit control:
<ContentPage ...
xmlns:dxc="clr-namespace:DevExpress.Maui.Controls;assembly=DevExpress.Maui.Controls"
xmlns:dxc="clr-namespace:DevExpress.Maui.Editors;assembly=DevExpress.Maui.Editors">
<Grid>
<dxc:DXToolbar>
<!-- ... -->
<dxc:ToolbarCustomItem>
<dxe:CheckEdit IsChecked="True" Label="Light Theme" />
</dxc:ToolbarCustomItem>
</dxc:DXToolbar>
</Grid>
</ContentPage>
#Handle Loading
You can use the following inherited member to handle the ToolbarCustomItem loading:
Property | Description |
---|---|
Is |
Gets or sets whether a DXElement |
Loaded | Fires when the DXElement |
Unloaded | Fires when the DXElement |
#Customize Appearance
You can use the following properties to customize common ToolbarCustomItem appearance settings:
Property | Description |
---|---|
Corner |
Gets or sets a Toolbar |
Margin | Gets or sets the margin value of a Toolbar |
Padding | Gets or sets the padding of a Toolbar |
Show |
Gets or sets whether a Toolbar |
Content | Gets or sets the custom content of the toolbar button. This is a bindable property. |
Content |
Gets or sets a template that configures the content‘s appearance. This is a bindable property. |
View |
Gets or sets the style applied to content within a Toolbar |
Style | Gets or sets the style applied to a DXElement |
View |
Gets or sets the style applied to content within a Toolbar |
#Size and Alignment
You can use the following properties to customize common ToolbarCustomItem size and alignment settings:
Property | Description |
---|---|
Height |
Gets or sets height of a Toolbar |
Maximum |
Gets or sets maximum height of a Toolbar |
Minimum |
Gets or sets minimum height of a Toolbar |
Width |
Gets or sets width of a Toolbar |
Maximum |
Gets or sets maximum width of a Toolbar |
Minimum |
Gets or sets minimum width of a Toolbar |
Horizontal |
Gets or sets the horizontal alignment of a Toolbar |
Horizontal |
Gets or sets the horizontal alignment of a Toolbar |
Vertical |
Gets or sets the vertical alignment of a Toolbar |
Vertical |
Gets or sets the vertical alignment of a Toolbar |
#Background Color
You can use the BackgroundColor property to customize a ToolbarCustomItem background color.
#Border
You can use the following properties to customize a ToolbarCustomItem border:
Property | Description |
---|---|
Border |
Gets or sets a Toolbar |
Border |
Gets or sets a Toolbar |
#Icon
You can use the following properties to display and customize a ToolbarCustomItem icon:
Property | Description |
---|---|
Icon | Gets or sets the icon that is displayed within a Toolbar |
Show |
Gets or sets whether a Toolbar |
Icon |
Gets or sets the aspect of the icon that is displayed within a Toolbar |
Icon |
Gets or sets the icon height of a Toolbar |
Icon |
Gets or sets the icon width of a Toolbar |
Icon |
Gets or sets the icon placement within a Toolbar |
Icon |
Gets or sets the icon indent of a Toolbar |
Icon |
Gets or sets whether the toolbar item’s icon should change its colors in pressed and disabled states. This is a bindable property. |
Icon |
Gets or sets the icon color of a Toolbar |
#Text and Font Settings
You can use the following properties to display and customize a ToolbarCustomItem font settings:
Property | Description |
---|---|
Font |
Gets or sets a Toolbar |
Font |
Gets or sets a Toolbar |
Font |
Gets or sets a Toolbar |
Font |
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. |
Text |
Gets or sets the text color of a Toolbar |
Text |
Gets or sets the spacing between characters of a Toolbar |
Text |
Gets or sets text decorations applied to a Toolbar |
Text |
Gets or sets the horizontal alignment applied to a Toolbar |
Text |
Gets or sets the vertical alignment applied to a Toolbar |
Text |
Gets or sets the line breaking mode for a Toolbar |
Text |
Gets or sets line height applied to a Toolbar |
Text |
Gets or sets the maximum number of a Toolbar |