.NET MAUI SegmentedControl Item Tapped
The SegmentedControl notifies you about tap interactions on its segments independently of the current selection. This allows you to handle taps on segments that are already selected, or to react to user interaction when the SelectionMode is set to None.
The control exposes the following members for responding to tap interactions:
ItemTapped—Event raised when a segment is tapped, regardless of theSelectionMode. The event handler receives aRadTappedEventArgs<object>argument whoseItemproperty is the tapped business item.ItemTappedCommand(ICommand)—Command executed when a segment is tapped. The command parameter is the data item of the tapped segment.
The
ItemTappedevent and theItemTappedCommandcommand are raised for every tap, including taps on the currently selected segment. Use them when you need to perform an action on each tap rather than only when the selection changes. To react to selection changes, use theSelectionChangedevent instead.
For a runnable example demonstrating the SegmentedControl Item Tapped scenario, see the SDKBrowser Demo Application and go to the SegmentedControl > Item Tapped category.