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

SfRating control not shown in DataTemplate of CollectionView

I want to show an SfRating control per item in a list represented in a CollectionView.
When I add the SfRating into the DataTemplate of my CollectionView.ItemTemplate, it is not visible in the UI at runtime but I can see it in the Live Visual Tree.

When I add an SfRating control with the exact same configuration outside of the collection view in the same StackLayout, it is visible at runtime.

Find the code of my view attached.

Attachment: TeaListPage_7851b8fd.zip

3 Replies

AK Arunachalam Kandasamy Raja Syncfusion Team May 9, 2023 06:27 AM UTC

Hi Bastian,


Thanks for contacting Syncfusion support.


We were unable to reproduce the reported query on our end. To better understand the root cause and assist with resolving the issue, it would be helpful if you could provide more detailed information about the scenario in which our control was used, including a sample demonstrating the issue with replication steps. Please let us know if you have any other queries.


Kindly review the attached example and apply any required modifications to reproduce the problem. Afterward, kindly forward the sample to us, as it would enable us to conduct a more thorough investigation of the issue.



Arunachalam K

Attachment: SfRatingSampleF182180_fae28388.zip

BB Bastian Bohac May 20, 2023 01:44 PM UTC

Hi Arunachalam,

I've tried the sample you attached, but sadly I face the same problem, the SfRating control is not visible as you can see in the first image found in the zip attached.

I just realised it's all my fault. My Windows, and therefore my app, uses dark mode.
After switching to light mode, I now can see the control as expected as shown in the second screenshot.

So, it has always been there, but it did not like my dark mode. Strange enough, I assumed I'd see the golden stars on a dark background.

Kind regards,

Attachment: SfRatingSample_9e83b4f8.zip

AK Arunachalam Kandasamy Raja Syncfusion Team May 23, 2023 12:54 PM UTC

Hi Bastian,


We have already color change properties within the SfRating control to facilitate easy customization of colors based on different themes. To demonstrate this functionality, we have created a sample for your reference. In the light theme, we have set the RatedFill color to blue, while in the dark theme, it has been set to gold.


You have the flexibility to modify the colors as per your specific requirements. For a better understanding, we have attached a sample and demo video. If you have any further questions or need additional assistance, please let us know.



Arunachalam K

Attachment: SfRatingSampleF182180_d9dc8ff0.zip

Live Chat Icon For mobile
Up arrow icon