Xamarin Forms Rating Star

Hello friends. In this article, I would like to talk about a topic that I am not looking for. You may want to evaluate anything in your project. This is either a user evaluation or a product evaluation. You may need to evaluate with stars for this. Native as a very comfortable way you can put the screen, but Xamarin.Forms’da this business is a bit confused. In this article we will try to get it done in a very simple way.

First, we need 2 stars photos. The first one is the hollow star. The other is the yellow star that will be created when the star is clicked. After the stars are done, we are going to the design section. Here we will create the grid structure. How many stars on our screen we want to create a column. Then we put the five hollow stars here.

The design screen is as follows.

Then we need to do their operations. We need to write a function to be clicked on 5 stars. In these functions I am actually only changing the pictures of the stars. Of course, we need to check whether these will be changed. Finally, we write a function that generally changes a star rating. In fact, we could have done all this at once. We could assign a command parameter to the images and send them when clicked. For simplicity, I created a separate function for each star.

You can see the screenshots below.

2 thoughts on “Xamarin Forms Rating Star

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.