Xceed Toolkit Plus for WPF v4.6 Documentation
Rating Class
Members 


Xceed.Wpf.Toolkit Assembly > Xceed.Wpf.Toolkit Namespace : Rating Class
The main class for the Rating control. Setting the Value property will highlight the corresponding RatingItem icons.
Syntax
'Declaration
 
<DefaultEventAttribute("OnItemsChanged")>
<DefaultPropertyAttribute("Items")>
<ContentPropertyAttribute("Items")>
<StyleTypedPropertyAttribute(Property="ItemContainerStyle", StyleTargetType=System.Windows.FrameworkElement)>
<LocalizabilityAttribute(LocalizationCategory.None, Readability=Readability.Unreadable)>
<XmlLangPropertyAttribute("Language")>
<UsableDuringInitializationAttribute(True)>
<RuntimeNamePropertyAttribute("Name")>
<UidPropertyAttribute("Uid")>
<TypeDescriptionProviderAttribute(MS.Internal.ComponentModel.DependencyObjectProvider)>
<NameScopePropertyAttribute("NameScope", System.Windows.NameScope)>
Public Class Rating 
   Inherits System.Windows.Controls.ItemsControl
'Usage
 
Dim instance As Rating
[DefaultEvent("OnItemsChanged")]
[DefaultProperty("Items")]
[ContentProperty("Items")]
[StyleTypedProperty(Property="ItemContainerStyle", StyleTargetType=System.Windows.FrameworkElement)]
[Localizability(LocalizationCategory.None, Readability=Readability.Unreadable)]
[XmlLangProperty("Language")]
[UsableDuringInitialization(true)]
[RuntimeNameProperty("Name")]
[UidProperty("Uid")]
[TypeDescriptionProvider(MS.Internal.ComponentModel.DependencyObjectProvider)]
[NameScopeProperty("NameScope", System.Windows.NameScope)]
public class Rating : System.Windows.Controls.ItemsControl 
Example

         <xctk:Rating x:Name="_rating"

                                ItemCount="5" // Use 5 icons

                                Value="3" // Currently show 3 icons filled

                                ReadOnly="false" // Make the control interactive

                                RatingValueChanged="Rating_RatingValueChanged" // Subscribe to the change event

         />

Inheritance Hierarchy

System.Object
   System.Windows.Threading.DispatcherObject
      System.Windows.DependencyObject
         System.Windows.Media.Visual
            System.Windows.UIElement
               System.Windows.FrameworkElement
                  System.Windows.Controls.Control
                     System.Windows.Controls.ItemsControl
                        Xceed.Wpf.Toolkit.Rating

Requirements

Target Platforms: Windows 11, Windows 10, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

Rating Members
Xceed.Wpf.Toolkit Namespace