# .NET MAUI Entry ToolbarItem

Add input fields to the Toolbar by using the `EntryToolbarItem`.

The available configuration property is:

* `Text`(`string`)—Defines the text (target type `Label`) in the toolbar item. You can display an image next to the text.

## Events

The Entry Toolbar item emits the following events:

* `TextChanged`—Raised when the `EntryToolbarItem.Text` property has changed.
* `EntryCompleted`—Raised when the user finalizes the text in the `Microsoft.Maui.Controls.Entry` control by pressing the `Return` key.

## Styling

You can style the `EntryToolbarItem` by using the following property:

* `Style`—The target type of the property is the `EntryToolbarItemView` control.

In addition to the `Style` property that is specific to the Telerik `EntryToolbarItem`, you can also use the `EntryStyle` property (target type `RadEntry`) and use all properties that are available for customizing and styling the `RadEntry` control. Some of these properties are:

* `TextColor`(`Microsoft.Maui.Graphics.Color`)—Specifies the color of the text in the toolbar item.
* `Placeholder`(`string`)—Specifies the text that is displayed when the control is empty.
* `PlaceholderColor`(`Microsoft.Maui.Graphics.Color`)—Specifies the color of the text that is displayed when the control is empty.
* `FontFamily`(`string`)—Specifies the font family of the text to display in the toolbar item.
* `FontAutoScalingEnabled`(`bool`)—Determines whether the font of the entry scales automatically according to the operating system settings. Default value is true.
* `FontSize`(`double`)—Specifies the font size of the text to display in the toolbar item.
* `FontAttributes`(enum of type `Microsoft.Maui.Controls.FontAttributes`)—Defines the font attributes of the text to display in the toolbar item. Default value is `None`.
* `HorizontalTextAlignment`(enum of type `Microsoft.Maui.TextAlignment`)—Defines the horizontal alignment of the text to display in the toolbar item. The default value is `Start`.
* `VerticalTextAlignment`(enum of type `Microsoft.Maui.TextAlignment`)—Defines the vertical alignment of the text to display in the toolbar item. Default value is `Center`.
* `HorizontalOptions`(enum of type `Microsoft.Maui.Controls.LayoutOptions`)—Specifies the horizontal alignment options of the content displayed in the toolbar item.
* `VerticalOptions`(enum of type `Microsoft.Maui.Controls.LayoutOptions`)—Specifies the vertical alignment options of the content displayed in the toolbar item.

The following example demonstrates how to style the `EntryToolbarItem` using implicit style.

**1.** Apply the style in the resources:

```XAML
<Style TargetType="telerik:RadEntry" x:Key="entryStyle">
    <Setter Property="Placeholder" Value="Search here or type a URL" />
    <Setter Property="ReserveSpaceForErrorView" Value="False" />
    <Setter Property="TextColor" Value="#0A5CBF" />
</Style>
```

**2.** Add the `EntryToolbarItem` definition:

```XAML
<Style TargetType="telerik:EntryToolbarItemView">
    <Setter Property="EntryStyle" Value="{StaticResource entryStyle}" />
    <Setter Property="WidthRequest" Value="220" />
</Style>
```

## See Also

* [SplitButton ToolbarItem](https://www.telerik.com/maui-ui/documentation/controls/toolbar/items/split-button)
* [ToggleButton ToolbarItem](https://www.telerik.com/maui-ui/documentation/controls/toolbar/items/toggle-button)
* [NavigationButton ToolbarItem](https://www.telerik.com/maui-ui/documentation/controls/toolbar/items/navigation-button)
* [ListPicker ToolbarItem](https://www.telerik.com/maui-ui/documentation/controls/toolbar/items/listpicker-button)
* [Group ToolbarItem](https://www.telerik.com/maui-ui/documentation/controls/toolbar/items/group)
* [RadioButton ToolbarItem](https://www.telerik.com/maui-ui/documentation/controls/toolbar/items/radio-button)
* [Slider ToolbarItem](https://www.telerik.com/maui-ui/documentation/controls/toolbar/items/slider)
