The SlickRater control ships with a handful of pre-made images to help you get started. These are:
star.gif
square_subtle.gif
square.gif
circle.gif
flower.gifYou can also create your own if you would like to customize your controls further.
Depending on the value of the ImageMode property controls are built from images in 2 ways:
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.
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.
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 (
).
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.
Image filenames must conform to a convention.
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.
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.
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 (