ASPxRatingControl.ImageMapUrl Property
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v19.2.dll
Declaration
[DefaultValue("")]
public string ImageMapUrl { get; set; }
<DefaultValue("")>
Public Property ImageMapUrl As String
Property Value
Type |
Default |
Description |
String |
String.Empty
|
A System.String value specifying the URL representing the path to the image.
|
The ImageMapUrl property is useful to specify a URL representing the path to the custom image. Custom image can be used to customize the control’s items appearance in different states (hovered, selected, etc.) - either a unified image for all items, or a specific appearance for each item in accordance with the ASPxRatingControl.ItemCount property.
For more information, see the Customizing Item’s Images topic.
Example
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.
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){
}
}
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register Assembly="DevExpress.Web.v9.2, Version=9.2.0.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxRatingControl" TagPrefix="dxrc" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<dxrc:ASPxRatingControl ID="Rating" runat="server"
ImageMapUrl="~/rating.png" ItemHeight="24" ItemWidth="24" Value="3.75"
FillPrecision="Exact" />
</div>
</form>
</body>
</html>
Imports Microsoft.VisualBasic
Imports System
Imports System.Collections.Generic
Imports System.Linq
Imports System.Web
Imports System.Web.UI
Imports System.Web.UI.WebControls
Partial Public Class _Default
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
End Sub
End Class
<%@ Page Language="vb" AutoEventWireup="true" CodeFile="Default.aspx.vb" Inherits="_Default" %>
<%@ Register Assembly="DevExpress.Web.v9.2, Version=9.2.1.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxRatingControl" TagPrefix="dxrc" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<dxrc:ASPxRatingControl ID="Rating" runat="server"
ImageMapUrl="~/rating.png" ItemHeight="24" ItemWidth="24" Value="3.75"
FillPrecision="Exact" />
</div>
</form>
</body>
</html>
See Also