Skip to main content

ASPxRatingControl.ItemWidth Property

Gets or sets an item’s width.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v22.1.dll


public int ItemWidth { get; set; }

Property Value

Type Default Description
Int32 19

An integer value representing the item’s width in pixels.


The ItemWidth property, together with the ASPxRatingControl.ItemHeight property, are useful to specify the item‘s size, for customizing the items images via the ASPxRatingControl.ImageMapUrl property.

For more information, see the Customizing Item’s Images topic.


This sample illustrates how to customize the ASPxRatingControl‘s items images.

For this purpose, use the control’s ASPxRatingControl.ImageMapUrl, ASPxRatingControl.ItemWidth and ASPxRatingControl.ItemHeight properties, that specify a custom image, and its size.

View Example

<dxrc:ASPxRatingControl ID="Rating" runat="server" ImageMapUrl="~/rating.png" 
    ItemHeight="24" ItemWidth="24" Value="3.75" FillPrecision="Exact" />
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class _Default : System.Web.UI.Page 
    protected void Page_Load(object sender, EventArgs e){
See Also