New to Telerik UI for Xamarin? Download free 30-day trial

Disable a Segment

RadSegmentedControl allows you to disable each of its segments individually.

To disable a segment you can use the SetSegmentEnabled method. The method accepts two arguments index that determines the index of the segment. And isEnabled that determines whether the item is enabled or not.

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

Setting a 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.

<telerikInput:RadSegmentedControl x:Name="segmentControl"
        <x:Array Type="{x:Type x:String}">
this.segmentControl.SetSegmentEnabled(2, false);

Figure 1: Disabled segment

SegmentedControl disable segment example

See Also

In this article