RatingEdit Class

Represents a rating editor.

Namespace: DevExpress.Xpf.Editors

Assembly: DevExpress.Xpf.Core.v20.1.dll

Declaration

public class RatingEdit :
    BaseEdit,
    IImageExportSettings,
    IExportSettings
Public Class RatingEdit
    Inherits BaseEdit
    Implements IImageExportSettings,
               IExportSettings

Remarks

The RatingEdit is used to visualize and allow end-users to select the rating.

RatingEdit

TIP

The RatingEdit class inherits its features from the BaseEdit class.

Refer to the BaseEdit class description for information on derived features and API.

Create a RatingEdit

<Window ...
    xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors">

<!-- Specify value using the RatingEdit.Value property -->
<dxe:RatingEdit Value="3" Precision="Half"/>

<!-- Specify value using the BaseEdit.EditValue property -->
<dxe:RatingEdit EditValue="3" Precision="Half"/>

RatingEdit Value

The editor's value can be specified using the BaseEdit.EditValue or Value property.

To respond to changing the editor's value, handle the BaseEdit.EditValueChanged event. To check the new value's validity, handle the BaseEdit.Validate event.

Value Edit Range and Value Precision

Use the Minimum and Maximum properties to specify the edit value range.

The ItemsCount property allows you to specify a number of items (stars) used to visualize the editable range.

The rating can be set or displayed with exact, half, or full precision. You can set custom rating precision using the Precision property.

<dxe:RatingEdit 
    Precision="Exact" 
    Minimum="7" 
    Maximum="10" 
    ItemsCount="3"/>

ratingedit custom range precision

Appearance

The ItemStyle property allows you to specify a custom style applied to rating items (stars). The rating items are the objects of RatingItem type.

Use the Orientation property to specify whether to show a rating editor in vertical or horizontal orientation.

See Also