Included Images

The SlickRater control ships with a handful of pre-made images to help you get started. These are:

You can also create your own if you would like to customize your controls further.

How Controls Are Built From Images

Depending on the value of the ImageMode property controls are built from images in 2 ways:

  1. When the ImageMode property is set to ImageMode.Single controls display only a single image at a time. When a user then passes the mouse over the control the single image is replaced with another single image representing the user's rating if he/she were to click on the control at that mouse position. This means there needs to be one image created for every possible user rating.

    Average rating values are shown when the user has never clicked the control, and does not have the mouse over the control. Average rating values are rounded to the nearest 1/5 of a rating point, so this means there needs to exist 5 images for every point on the rating scale.

  2. ImageMode.SingleLocked is the same as ImageMode.Single except that an additional set of "locked" images are required, one for each possible user rating. The locked image is used when the use holds the mouse down over the image, or when the mouse is not over the image. This allows for a differentiation between the set and unset rating.

  3. When the ImageMode property is set to ImageMode.Multiple every image represents a single point on the rating scale, so for example if the rating scale consists of 5 possible values then the control will be made up of 5 images. Each of these images will represent either an empty rating (), an average rating (), a fractional average rating rounded to the nearest 1/5 of a point (such as ) or a user rating ().

File Locations

All images belong in the ~/aspnet_client/SlickRater/[version]/directory. Controls made up of a single image go in the images_single subdirectory off of this directory, while controls made up of multiple images go in the images_multiple subdirectory.

Naming Conventions

Image filenames must conform to a convention.

  1. For ImageMode.Single the convention is:
    • [base name]_1_[size of rating scale]_[user rating].[base extension] for user ratings and
    • [base name]_2_[size of rating scale]_[average rating integer]_[average rating fraction].[base extension] for average ratings.

    For example a control with star.gif as its Image property, a 5-star rating scale, an average rating of 3.2 and no user rating would show the image star_2_5_3_2.gif.

  2. ImageMode.SingleLocked using the same conventions as ImageMode.Single with the addition of the following:
    • [base name]_0_[size of rating scale]_[user rating].[base extension] for locked images.
  3. For ImageMode.Multiple the convention is:

    • [base name].[base extension] for empty values ()
    • [base name]_avg.[base extension] for average rating ()
    • [base name]_avg_[average rating fraction].[base extension] for a fractional average rating ()
    • [base name]_user.[base extension] for a user rating ()