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

I can not configure SfRating...

I'm new using Syncfusion.
I think the documentation is obsolete. It says to use this sintax:
 x:Name="ratingSettings" RatedFill="Red" />
It doesn't work. I try this:
<rating:SfRating x:Name="Rating" Value="4" ItemSize="20" HorizontalOptions="Center">
                <rating:SfRatingSettings RatedFill="#F6FF00"/>
            </rating:SfRating>
Doesn"t work RatedFill neither HorizontalOptions="Center"
The stars come at left and with default collor blue...
Any tip?
Thanks in advance...



6 Replies

RK Rathana Kumar Sekar Syncfusion Team May 15, 2017 10:29 AM UTC

Hi Luis,

Thanks for contacting Syncfusion Support.

We have prepared the sample for you and which we have implemented the SfRating. Please find the sample from the below link.

We will correct our UG documentation and we will republish the UserGuide in upcoming release Volume 3, 2017.

Regards,
Rathanakumar S.



LA Luis Alfredo Stockler Filho May 15, 2017 02:38 PM UTC

Thank you Rathama for your answer.

RatedFill is working now but HorizontalOptions = "Center" does not work in any way...

Look may code, I have a StackLayout vertical with 2 elements: SfRating and a Button. Both with center alignment.
The Button align as expected in center but SfRating only align at left...

            <StackLayout Orientation="Vertical">
                <rating:SfRating       ItemCount="5"
                                       Value="3.6"
                                       Precision="Exact"
                                       TooltipPlacement="None"
                                       ItemSize="20"
                                       HorizontalOptions="Center">
                    <rating:SfRating.RatingSettings>
                        <rating:SfRatingSettings RatedFill="Gold" UnRatedFill="White" RatedStroke="Black" UnRatedStroke="Black" />
                    </rating:SfRating.RatingSettings>
                </rating:SfRating>
                <Button Text="Todas as avaliações" TextColor="Black" FontSize="Small" HorizontalOptions="Center"/>
            </StackLayout>



LA Luis Alfredo Stockler Filho May 15, 2017 02:59 PM UTC

This is the screenshot from this code...
You see the SfRating alignment is aways left...

            <StackLayout Orientation="Vertical">
                <rating:SfRating       ItemCount="5"
                                       Value="3.6"
                                       Precision="Exact"
                                       TooltipPlacement="None"
                                       ItemSize="20"
                                       HorizontalOptions="Center">
                    <rating:SfRating.RatingSettings>
                        <rating:SfRatingSettings RatedFill="Gold" UnRatedFill="White" RatedStroke="Black" UnRatedStroke="Black" />
                    </rating:SfRating.RatingSettings>
                </rating:SfRating>
                <Button Text="Todas as avaliações" TextColor="Black" FontSize="Small" HorizontalOptions="Center"/>
            </StackLayout>


Attachment: Screenshot_20170515114132_650d02e7.rar


RK Rathana Kumar Sekar Syncfusion Team May 16, 2017 11:27 AM UTC

Hi Luis,

Thanks for your update.

In our current implementation, there is no support for SfRating control autosizing. Due to this, it is needed to manually set the WidthRequest of the control based on the item size we set. We have already logged feature report for "SfRating autosizing" and it will be available our upcoming Vol 2 SP 1 release and which will be rolled out by the end of this month.

We have created a sample based on your requirement by providing WidthRequest to the control. Please find the sample from the below link.

Sample: https://www.syncfusion.com/downloads/support/forum/130466/ze/RatingItemspacing-1968891897

Regards,
Rathanakumar S.


LA Luis Alfredo Stockler Filho May 17, 2017 09:27 PM UTC

Thank Rathana for your answer.

I've tested here and it is working now... a little bit awkard but it's working...

Thank you again for your fast and precise answers.

Luis Alfredo


RK Rathana Kumar Sekar Syncfusion Team May 18, 2017 09:39 AM UTC

Hi Luis,

Thanks for your update.

We are glad to know given solution helps you.

Please let us know if you have any other query.

Regards,
Rathanakumar S.


Loader.
Live Chat Icon For mobile
Up arrow icon