Text won't be centered after switch between tab with SfSegmentedControl

I've implemented SfSegmentedControl on my page using Xamarin. In the Android version, SfSegmentedControl is working perfectly, the text is remain in center after switch between tab. But in the IOS version, the text is not centered anymore after switch between tab, it move to the left and top. This is the screenshot of my SfSegmentedControl on IOS.


This is when i open it for the first time, the text is centered correctly.

Screenshot 2024-05-03 155453.png


This is after i switch to another tab.

Screenshot 2024-05-03 155510.png


Below is my code that i implemented on xaml,

<StackLayout Grid.Row="1">

    <buttons:SfSegmentedControl

        Style="{StaticResource SimpleSegmentedControlStyle}"

        SelectedIndex="{Binding PosActiveCtg}"

        SegmentHeight="{extension:OnScreenSize DefaultSize=32, ExtraSmall=30, Small=32, Medium=32, Middle=32, Large=38, ExtraLarge=38}"

        ItemsSource="{Binding ItemCollection,Mode=TwoWay}">

        <buttons:SfSegmentedControl.Behaviors>

            <behaviors:EventToCommandBehavior EventName="SelectionChanged" Command="{Binding SelectionChangedCommand}" />

        </buttons:SfSegmentedControl.Behaviors>

    </buttons:SfSegmentedControl>


    <BoxView Style="{StaticResource HorizontalSeparatorStyle}" Color="{DynamicResource Gray-Base}"/>

</StackLayout>


1 Reply

VM Vidyalakshmi Mani Syncfusion Team May 6, 2024 02:02 PM UTC

Hi Reza,


Thank you for contacting us. After reviewing the information provided, we conducted tests to replicate the reported issue but were unable to do so. In our testing, we checked by switching different segments and it worked fine on iOS platform. To assist you further, we have attached a sample project demonstrating our test setup for your reference. Please review our sample and let us know if you are still experiencing the same issue. If not, please modify our sample to match your scenario and provide us with the modified sample. Alternatively, if modifying our sample is not feasible, please share your sample project where you encountered the issue with us for further investigation. Sharing this information will help us in resolving the issue you are facing.


Regards,
Vidyalakshmi M.



Attachment: SegmentedControl_9135503d.zip

Loader.
Up arrow icon