Completed
Last Updated: 13 Mar 2024 08:17 by ADMIN
Release 6.8.0
Zach
Created on: 31 Oct 2023 14:06
Category: SegmentedControl
Type: Bug Report
1
SegmentedControl: [iOS] SelectedSegmentBackgroundColor is not applied on iOS
Setting SelectedSegmentBackgroundColor property of the SegmentedControl does not take any effect.
4 comments
ADMIN
Didi
Posted on: 11 Mar 2024 06:58

Hello Zach,

Thank you for the confirmation. I changed the status of the item to Completed. It seems the behavior was related to the XCode or .NET Maui version, as with Telerik MAUI 6.5.0/6.7.0 the issue cannot be reproduced and we didn't apply any fixes in the segmented control. 

Regards,
Didi
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Zach
Posted on: 08 Mar 2024 17:40

Hi Didi,

Apologies for the late reply. I updated the packages in our application, removed the temporary fix that Yana had suggested, and the control now works as expected. Thank you!

Best Regards,

Zach

ADMIN
Didi
Posted on: 01 Mar 2024 16:35

Hi Zach,

The team tested the behavior and it seems the issue no longer occurs. Could you please verify on your side? 

For example I tested on iPhone simulator 15 with iOS 17.0 and iOS 17.2 and no issue. I have used Telerik MAUI 6.6.0 and 6.7.0

I can suggest you update maui, XCode, iOS version, etc. It seems the behavior is related to some of the versions of XCode, iOS, Microsoft .NET iOS sdk, maui, etc. With Telerik 6.6.0 and 6.7.0 there isn't an issue with the segmented control. 

Looking forward to your reply.

Regards,
Didi
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

ADMIN
Yana
Posted on: 31 Oct 2023 14:22

For now you can use the following workaround - subscribe to the SegmentedControl HandlerChanged:

 

<telerik:RadSegmentedControl
    x:Name="segmented"
    HandlerChanged="segmented_HandlerChanged">

and inside the HandlerChanged get the native UISegmentedControl and set its selected background color, for example:

 

void segmented_HandlerChanged(System.Object sender, System.EventArgs e)
{
#if IOS
    if((sender as RadSegmentedControl)?.Handler?.PlatformView is UIKit.UISegmentedControl segmented)
    {
        segmented.SelectedSegmentTintColor = UIKit.UIColor.Red;
    }
#endif
}

 

Regards,
Yana
Progress Telerik

A brand new .NET MAUI course was just added to the Virtual Classroom. The training course is developed to help you get started with the Telerik UI for .NET MAUI components and features. It aims to put you in the shoes of an engineer who adds new features to an existing application. You can check it out at https://learn.telerik.com