New to Telerik UI for .NET MAUI? Start a free 30-day trial

Disabling Segments in .NET MAUI SegmentedControl

The SegmentedControl allows you to disable each of its segments individually.

To disable a segment, use the SetSegmentEnabled method, which accepts the following arguments:

  • index determines the index of the segment.

  • isEnabled determines whether the item is enabled or not.

You can also check if an item is enabled through the IsSegmentEnabled method. The method accepts a single index argument.

Setting the Text Color

You can set the text color of the disabled segment through the DisabledSegmentTextColor.


The following example shows how to disable a segment and define a color for it.

Define the control.

<telerik:RadSegmentedControl x:Name="segmentControl"
        <x:Array Type="{x:Type x:String}">

You can disable any segment with SetSegmentEnabled method:

this.segmentControl.SetSegmentEnabled(2, false);

The following image shows the end result.

.NET MAUI SegmentedControl disable segment

See Also

In this article