Skip to main content

RatingEdit

The RatingEdit control is used to visualize and edit ratings.

RatingEdit

The RatingEdit control offers the following features.

  • Customizable precision

    Use the RatingEdit.Precision property to specify the required precision. The following settings are available.

    • Exact
    • Full
    • Half
  • Customizable number of rating items

    Use the RatingEdit.ItemsCount property to specify the number of rating items.

  • Customizable rating item appearance

    You can change rating item appearance using custom styles. The following example demonstrates how to create RatingEdit with pentagonal rating items.

    <Editors:RatingEdit>
        <Editors:RatingEdit.ItemStyle>
            <Style TargetType="Editors:RatingItem">
                <Setter Property="Background" Value="LightGray" />
                <Setter Property="HoverBackground" Value="CadetBlue" />
                <Setter Property="SelectedBackground" Value="DarkCyan" />
                <Setter Property="VerticalAlignment" Value="Stretch" />
                <Setter Property="Geometry" Value="M27.5,0.5L54.5,21L44,54.5L11,54.5L0.5,21z" />
                </Setter>
            </Style>
        </Editors:RatingEdit.ItemStyle>
    </Editors:RatingEdit>
    

    ratingedit pentagonal

To add the RatingEdit to a page, drag it from the Toolbox. Alternatively, you can create RatingEdit using XAML markup as shown in the code snippet below.

xmlns:Editors="using:DevExpress.UI.Xaml.Editors"
<Editors:RatingEdit Precision="Half" ItemsCount="10" EditValue="7.5"/>

In this case, manually add references to the following libraries.

  • DevExpress.Controls
  • DevExpress.Core

To add references, right-click References in the Solution Explorer and select Add Reference… in the invoked context menu.

Note

To collect all assemblies that may be required for your application, use the Assembly Deployment Tool.