# Bunifu Rating

Bunifu Rating is a simple and elegant control that allows you to provide rating systems in your Windows Forms apps, e.g. Books & Movie review inputs, games, e.t.c.

<div align="left"><img src="https://1116551356-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M7fmEPVv4n0I819sdaz%2F-M8z8whpJ1U7H-u_fj7Y%2F-M8z9x6847fs4j6F-OA7%2Fimage.png?alt=media&#x26;token=4200d4e7-d8a6-4fc0-aabb-f5cd21a8f335" alt=""></div>

## **Adding Bunifu Rating control on your Form at Design Time**

Simply locate Bunifu Rating in your Toolbox and drag it to your form&#x20;

<div align="left"><img src="https://1116551356-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M7fmEPVv4n0I819sdaz%2F-M8z8whpJ1U7H-u_fj7Y%2F-M8zAeHo8A95hGUi7dKZ%2Fimage.png?alt=media&#x26;token=60d89978-9f2f-4567-88b3-b85d3ce81bac" alt=""></div>

### **Adding Bunifu Rating control on our form at Run Time**

On Load event handler, we just have to put the following two lines of code.&#x20;

{% tabs %}
{% tab title="C#" %}

```csharp

var bunifuRating = new Bunifu.UI.WinForms.BunifuRating(); 
this.Controls.Add(bunifuRating);

```

{% endtab %}

{% tab title="VB.NET" %}

```

Dim bunifuRating As New Bunifu.UI.WinForms.BunifuRating
Controls.Add(bunifuRating)

```

{% endtab %}
{% endtabs %}

\
On running your app, you should see something similar to this:

![Bunifu Rating control at runtime](https://1116551356-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M7fmEPVv4n0I819sdaz%2F-M935rcUx6lND3tXMc7h%2F-M9367uCQxwo00VwJSyi%2Fbunifu-rating-runtime.png?alt=media\&token=3e876910-373a-414a-b6e5-3d757445d983)

![Bunifu Rating in action](https://1116551356-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M7fmEPVv4n0I819sdaz%2F-M935rcUx6lND3tXMc7h%2F-M936qkHj0vH0sZpSDjX%2Fbunifu-rating-in-action.gif?alt=media\&token=6c6b953c-bba2-46c1-aa1b-9d50f57cd60d)

![Bunifu Rating in some serious activity](https://1116551356-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M7fmEPVv4n0I819sdaz%2F-M9398r1C4FoTAnrWWSZ%2F-M93Qm-UyEzPn8zy8czi%2Fbunifu-rating-selections.gif?alt=media\&token=07116df4-c7b0-4e79-ab32-5ad97670d9ab)

![Bunifu Rating in some serious dark-themed activity](https://1116551356-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M7fmEPVv4n0I819sdaz%2F-M94N7QomVbYMdRdG7kg%2F-M94Tlvm85_ol5xl3GHD%2Fbunifu-rating-selections-dark-theme.gif?alt=media\&token=ac5f57c7-fb97-4ed8-b1d5-c71725c7a8e5)

## Properties

You can use **Smart Tags** to quickly navigate the common properties:

![Using Smart Tags in Bunifu Rating](https://1116551356-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M7fmEPVv4n0I819sdaz%2F-M932IW-UMKnGleH7H7E%2F-M935HgjM9NgnnvTu93x%2Fbunifu-rating-smart-tags.png?alt=media\&token=d4888d0b-f7c9-420d-9bfc-975bdc01b431)

| Property                 | Description                                                                                            |
| ------------------------ | ------------------------------------------------------------------------------------------------------ |
| `Value`                  | Sets the current rating value.                                                                         |
| `Maximum`                | Sets the number of ratings or maximum-rating-count to be displayed. Example: `bunifuRating.Value = 4;` |
| `OuterRadius`            | Sets the rating's shape radius.                                                                        |
| `InnerRadius`            | Sets the inner radius of the **star** shape.                                                           |
| `Spacing`                | Sets the spacing between rating shapes.                                                                |
| `BorderThickness`        | Sets the border thickness of rating shapes.                                                            |
| `Shape`                  | Sets the rating shape style.                                                                           |
| `EmptyFillColor`         | Sets the fill color of unrated shapes.                                                                 |
| `EmptyBorderColor`       | Sets the border color of unrated shapes.                                                               |
| `HoverFillColor`         | Sets the fill color of rating shapes on hover.                                                         |
| `HoverBorderColor`       | Sets the border color of rating shapes on hover.                                                       |
| `RatedFillColor`         | Sets the fill color of rated shapes.                                                                   |
| `RatedBorderColor`       | Sets the border color of rated shapes.                                                                 |
| `DisabledEmptyFillColor` | Sets the fill color of unrated shapes when disabled.                                                   |
| `DisabledRatedFillColor` | Sets the fill color of rated shapes when disabled.                                                     |
| `ReadOnly`               | Sets a value indicating whether the rating is in read-only mode.                                       |
| `RightClickToClear`      | Sets a value indicating whether the rating will be cleared after right-clicking it.                    |

### Events

| Event          | Description                                                                                              |
| -------------- | -------------------------------------------------------------------------------------------------------- |
| `ValueChanged` | Occurs when the rating value has been changed. This uses the `ValueChangedEventArgs` to provide data.    |
| `ValueHovered` | Occurs when a rating value has been hovered onto. This uses the `ValueHoveredEventArgs` to provide data. |

### Methods

| Method               | Description                       |
| -------------------- | --------------------------------- |
| `Clear() or Reset()` | Clears/resets the current rating. |

### Remarks

We hope you will find Bunifu Rating useful in your design and that it will help you create better user experience for your users.&#x20;

Should you have feedback or suggestions please send us via chat on the bottom right corner of the screen.
