# .NET MAUI ListPickerButton ToolbarItem

Add a list picker toolbar item using the `ListPickerButtonToolbarItem`.

The exposed properties are:

* `ItemsSource`(`IList`)—Specifies a collection of items to display in the list.
* `ItemTemplate`(`DataTemplate`)—Specifies the `DataTemplate` used to generate content for the list items.
* `SelectedItem`(`object`)—Specifies the currently selected item in the list.
* `Text`(`string`)—Defines the text(target type `Label`) in the toolbar item. You can display an image next to the text.
* `ImageSource`(`Microsoft.Maui.Controls.ImageSource`)—Specifies the source of the image to display in the toolbar item.

## Events

The exposed events are:

* `SelectionChanged`—Raised when the current selection has changed.
* `Clicked`—Raised when the toolbar item is clicked.

## Commands

The available commands are:

* `Command`(`ICommand`)—Specifies the command to execute when the toolbar item is clicked.
* `CommandParameter`(`object`)—Specifies the parameter of the command, which is executed when the toolbar item is clicked.

## Styling

Style the `ListPickerButtonToolbarItem` using the following properties:

* `ItemStyle`(`Style`)—Specifies the style applied to the list items. The target type of this style is `Telerik.Maui.Controls.ToolbarListItemView`.
* `Style`(`Style`)—Specifies the style applied to the list items. The target type of this style is `Telerik.Maui.Controls.ListPickerButtonToolbarItemView`. The available properties are:
  * `ItemTemplate`(`DataTemplate`)—Specifies the `DataTemplate` used to generate content for the list items.
  * `SelectedItem`(`object`)—Specifies the currently selected item in the list
  * `ItemStyle`(`Style`)—Specifies the style applied to the list items. The target type of this style is `Telerik.Maui.Controls.ToolbarListItemView`.
  * `ItemsSource`(`IList`)—Specifies a collection of items to display in the list.
  * All properties applicable in [DropDownButtonToolbarItemView](https://www.telerik.com/maui-ui/documentation/controls/toolbar/items/dropdown-button#styling), [ButtonToolbarItemView](https://www.telerik.com/maui-ui/documentation/controls/toolbar/items/button#styling), [ToolbarItemView](https://www.telerik.com/maui-ui/documentation/controls/toolbar/items/overview#styling) and [LabelToolbarItemView](https://www.telerik.com/maui-ui/documentation/controls/toolbar/items/label#styling).

> caption Here is an example of how to style the `ListPickerButtonToolbarItem` and setting the visual states:

```XAML
<Style TargetType="telerik:ButtonToolbarItemView" x:Key="buttonItemStyle">
    <Setter Property="CornerRadius" Value="4" />
    <Setter Property="VisualStateManager.VisualStateGroups">
        <VisualStateGroupList>
            <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                    <VisualState.Setters>
                        <Setter Property="BackgroundColor" Value="Transparent" />
                        <Setter Property="TextColor" Value="#1188FF" />
                    </VisualState.Setters>
                </VisualState>
                <VisualState x:Name="PointerOver">
                    <VisualState.Setters>
                        <Setter Property="BackgroundColor" Value="#E6F2FF" />
                        <Setter Property="TextColor" Value="#0A5CBF" />
                    </VisualState.Setters>
                </VisualState>
                <VisualState x:Name="Opened">
                    <VisualState.Setters>
                        <Setter Property="BackgroundColor" Value="#1188FF" />
                        <Setter Property="TextColor" Value="White" />
                    </VisualState.Setters>
                </VisualState>
                <VisualState x:Name="Disabled">
                    <VisualState.Setters>
                        <Setter Property="BackgroundColor" Value="Transparent" />
                        <Setter Property="TextColor" Value="#B0B0B0" />
                    </VisualState.Setters>
                </VisualState>
            </VisualStateGroup>
        </VisualStateGroupList>
    </Setter>
</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)
* [Label ToolbarItem](https://www.telerik.com/maui-ui/documentation/controls/toolbar/items/label)
* [NavigationButton ToolbarItem](https://www.telerik.com/maui-ui/documentation/controls/toolbar/items/navigation-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)
