We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

SegmentItem should have IsVisible property


Trying to use the segmented control in xaml and I cannot set "IsVisible" on the SegmentItem.
I have scenarios where an item of the segmentcontrol should not be visible?
I know you have "VisibleSegmentsCount" that removes the last item ,what about if I want to make visible only 1 and 3 item.

Is it possible to add a bindable property to the SFSegmentItem so that you can bind the individual SegmentItem to a bool value in  your viewmodel.


        <buttons:SfSegmentedControl
            DisplayMode="Text"
            HeightRequest="80"
            SelectedIndex="1"
            VisibleSegmentsCount="3">
            <segmentCollection:List x:TypeArguments="buttons:SfSegmentItem">
                <buttons:SfSegmentItem
                    BackgroundColor="#939393"
                    FontColor="White"
                    FontFamily="{StaticResource IconFontsKey}"
                    FontSize="Medium"
                    IconFont="{x:Static styles:IconFonts.CCC}"
                    SelectionBackgroundColor="#6a80f7"
                    SelectionTextColor=" White"
                    Text="Segment 1" />

                <buttons:SfSegmentItem
                    BackgroundColor="#939393"
                    FontColor="White"
                    FontFamily="{StaticResource IconFontsKey}"
                    FontSize="Medium"
                    IconFont="{x:Static styles:IconFonts.BBB}"
                    SelectionBackgroundColor="#6a80f7"
                    SelectionTextColor=" White"
                    Text="Segment 2" />

                <buttons:SfSegmentItem
                    BackgroundColor="#939393"
                    FontColor="White"
                    FontFamily="{StaticResource IconFontsKey}"
                    FontSize="Medium"
                    IconFont="{x:Static styles:IconFonts.AAA}"
                    SelectionBackgroundColor="#6a80f7"
                    SelectionTextColor=" White"
                    Text="Segment 3" />

            </segmentCollection:List>
            <buttons:SfSegmentedControl.SelectionIndicatorSettings>
                <buttons:SelectionIndicatorSettings Position="Fill" />
            </buttons:SfSegmentedControl.SelectionIndicatorSettings>
        </buttons:SfSegmentedControl>

Thanks for your help

1 Reply

DD Devakumar Dhanapoosanam Syncfusion Team February 12, 2020 02:36 PM UTC

Hi Mobileguy, 
 
Greetings from Syncfusion. 
 
Currently we don’t have direct support to achieve your requirement. We have considered this as feature request and have logged feature request for your requirement. Please have a feedback link to track the status of the feature below 
 
 
We will prioritize the features every release based on the demands and we do not have immediate plan to implement this feature since we committed with already planned work. So, this feature will be available any of our upcoming release. 
 
If you have any more specifications/suggestions to the feature request, you can add it as a comment in the portal. 
 
Regards,   
Devakumar D  


Loader.
Live Chat Icon For mobile
Up arrow icon