RatingEdit Class
A rating editor.
Namespace: DevExpress.Xpf.Editors
Assembly: DevExpress.Xpf.Core.v24.2.dll
NuGet Package: DevExpress.Wpf.Core
Declaration
Remarks
The RatingEdit is used to visualize and allow end-users to select the rating.
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 changes to the editor value, handle the BaseEdit.EditValueChanged event. To check a 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"/>
Users can click ←, →, ↑ and ↓ keys on the keyboard to change the focused rating editor’s current value. The value change step depends on the Precision
property value. You can use tabbing navigation to focus on a specific rating editor using the keyboard.
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.