skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • AI Coding Assistants
    • Embedded Reporting
    • Document Processing Libraries
    • SSO Account Sign-in

    Web

    Kendo UI UI for Angular UI for Vue UI for jQuery KendoReact UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    AI Coding Assistants

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class RadRating

Represents a rating control that allows users to provide feedback by selecting a value from a range of visual rating items (typically stars).

Inheritance
System.Object
RadControl
RadRating
Inherited Members
RadControl.isResizing2
RadControl.isDisposing2
RadControl.invalidResizeRect
RadControl.isAccessibilityRequested
RadControl.Construct()
RadControl.CreateBehavior()
RadControl.CreateRootElement()
RadControl.InitializeRootElement(RootRadElement)
RadControl.LoadElementTree()
RadControl.LoadElementTree(Size)
RadControl.SetIsInitializing(Boolean)
RadControl.ShouldSerializeBackColor()
RadControl.SetBackColorThemeOverrides()
RadControl.ResetBackColorThemeOverrides()
RadControl.ShouldSerializeForeColor()
RadControl.SetForeColorThemeOverrides()
RadControl.ResetForeColorThemeOverrides()
RadControl.ShouldSerializeFont()
RadControl.OnKeyDown(KeyEventArgs)
RadControl.OnKeyUp(KeyEventArgs)
RadControl.OnPreviewKeyDown(PreviewKeyDownEventArgs)
RadControl.OnKeyPress(KeyPressEventArgs)
RadControl.OnClick(EventArgs)
RadControl.OnDoubleClick(EventArgs)
RadControl.OnMouseDown(MouseEventArgs)
RadControl.OnMouseUp(MouseEventArgs)
RadControl.OnMouseEnter(EventArgs)
RadControl.OnMouseLeave(EventArgs)
RadControl.OnMouseMove(MouseEventArgs)
RadControl.OnMouseHover(EventArgs)
RadControl.OnMouseWheel(MouseEventArgs)
RadControl.OnMouseCaptureChanged(EventArgs)
RadControl.OnGotFocus(EventArgs)
RadControl.OnLostFocus(EventArgs)
RadControl.OnCreateControl()
RadControl.OnHandleDestroyed(EventArgs)
RadControl.OnParentChanged(EventArgs)
RadControl.OnVisibleChanged(EventArgs)
RadControl.OnFontChanged(EventArgs)
RadControl.OnForeColorChanged(EventArgs)
RadControl.OnBackColorChanged(EventArgs)
RadControl.OnEnabledChanged(EventArgs)
RadControl.OnBindingContextChanged(EventArgs)
RadControl.OnLocationChanged(EventArgs)
RadControl.OnPaddingChanged(EventArgs)
RadControl.OnRightToLeftChanged(EventArgs)
RadControl.OnPaint(PaintEventArgs)
RadControl.OnLayout(LayoutEventArgs)
RadControl.OnAutoSizeChanged(EventArgs)
RadControl.WndProc(Message)
RadControl.OnInvalidated(RadElement)
RadControl.OnLoad(Size)
RadControl.OnCaptureLosing()
RadControl.OnThemeChanged()
RadControl.OnToolTipTextNeeded(Object, ToolTipTextNeededEventArgs)
RadControl.OnScreenTipNeeded(Object, ScreenTipNeededEventArgs)
RadControl.OnThemeNameChanged(ThemeNameChangedEventArgs)
RadControl.ProcessMnemonic(Char)
RadControl.ProcessFocusRequested(RadElement)
RadControl.ProcessCaptureChangeRequested(RadElement, Boolean)
RadControl.ProcessAutoSizeChanged(Boolean)
RadControl.CallOnMouseCaptureChanged(EventArgs)
RadControl.CallBaseOnGotFocus(EventArgs)
RadControl.CallBaseOnLostFocus(EventArgs)
RadControl.CallOnToolTipTextNeeded(Object, ToolTipTextNeededEventArgs)
RadControl.CallOnScreenTipNeeded(Object, ScreenTipNeededEventArgs)
RadControl.CallOnMouseUp(MouseEventArgs)
RadControl.CallOnMouseDown(MouseEventArgs)
RadControl.CallOnClick(EventArgs)
RadControl.CallOnDoubleClick(EventArgs)
RadControl.CallOnMouseEnter(EventArgs)
RadControl.CallOnMouseWheel(MouseEventArgs)
RadControl.CallOnMouseLeave(EventArgs)
RadControl.CallOnMouseMove(MouseEventArgs)
RadControl.CallOnMouseHover(EventArgs)
RadControl.CallOnPreviewKeyDown(PreviewKeyDownEventArgs)
RadControl.CallBaseOnKeyDown(KeyEventArgs)
RadControl.CallOnKeyDown(KeyEventArgs)
RadControl.CallBaseOnKeyPress(KeyPressEventArgs)
RadControl.CallOnKeyPress(KeyPressEventArgs)
RadControl.IsInputKey(Keys)
RadControl.GetInputElement()
RadControl.CallBaseOnKeyUp(KeyEventArgs)
RadControl.CallOnKeyUp(KeyEventArgs)
RadControl.CallOnThemeNameChanged(ThemeNameChangedEventArgs)
RadControl.CallOnVisibleChanged(EventArgs)
RadControl.BeginInit()
RadControl.EndInit()
RadControl.OnNotifyPropertyChanged(String)
RadControl.OnNotifyPropertyChanged(PropertyChangedEventArgs)
RadControl.IComponentTreeHandler.GetShowFocusCues()
RadControl.IComponentTreeHandler.CreateRootElement()
RadControl.IComponentTreeHandler.CreateChildItems(RadElement)
RadControl.IComponentTreeHandler.InitializeRootElement(RootRadElement)
RadControl.IComponentTreeHandler.InvalidateElement(RadElement)
RadControl.IComponentTreeHandler.InvalidateElement(RadElement, Rectangle)
RadControl.IComponentTreeHandler.InvalidateIfNotSuspended()
RadControl.IComponentTreeHandler.GetAmbientPropertyValue(RadProperty)
RadControl.IComponentTreeHandler.ControlThemeChangedCallback()
RadControl.IComponentTreeHandler.OnAmbientPropertyChanged(RadProperty)
RadControl.IComponentTreeHandler.OnFocusRequested(RadElement)
RadControl.IComponentTreeHandler.OnCaptureChangeRequested(RadElement, Boolean)
RadControl.IComponentTreeHandler.OnDisplayPropertyChanged(RadPropertyChangedEventArgs)
RadControl.IComponentTreeHandler.CallOnThemeNameChanged(ThemeNameChangedEventArgs)
RadControl.IComponentTreeHandler.CallOnMouseCaptureChanged(EventArgs)
RadControl.IComponentTreeHandler.CallOnToolTipTextNeeded(Object, ToolTipTextNeededEventArgs)
RadControl.IComponentTreeHandler.CallOnScreenTipNeeded(Object, ScreenTipNeededEventArgs)
RadControl.GetPreferredSize(Size)
RadControl.SetBoundsCore(Int32, Int32, Int32, Int32, BoundsSpecified)
RadControl.GetRootElementDesiredSize(Int32, Int32, Int32, Int32)
RadControl.OnZoomGesture(ZoomGestureEventArgs)
RadControl.OnRotateGesture(RotateGestureEventArgs)
RadControl.OnPanGesture(PanGestureEventArgs)
RadControl.OnTwoFingerTapGesture(GestureEventArgs)
RadControl.OnPressAndTapGesture(PressAndTapGestureEventArgs)
RadControl.OnGesture(GestureEventArgs)
RadControl.ProcessGesture(Message)
RadControl.EnableGesture(GestureType)
RadControl.DisableGesture(GestureType)
RadControl.Refresh()
RadControl.SuspendUpdate()
RadControl.ResumeUpdate()
RadControl.ResumeUpdate(Boolean)
RadControl.InvokeLayoutCallback(LayoutCallback)
RadControl.RegisterHostedControl(RadHostItem)
RadControl.UnregisterHostedControl(RadHostItem, Boolean)
RadControl.ResolveStyleGroupForElement(StyleGroup, RadObject)
RadControl.GetPlainText()
RadControl.CanEditUIElement(RadElement)
RadControl.GetChildAt(Int32)
RadControl.ShouldSerializeProperty(RadProperty)
RadControl.ShouldSerializeProperty(RadProperty, RadObject)
RadControl.ResetProperty(RadProperty, RadObject)
RadControl.CanEditElementAtDesignTime(RadElement)
RadControl.GetControlDefaultSize()
RadControl.GetDpiScaledSize(Size)
RadControl.GetDpiScaledSize(SizeF)
RadControl.ProcessCodedUIMessage(IPCMessage)
RadControl.FindPropertyInChildren(RadControl, IPCMessage)
RadControl.CallAccessibilityNotifyClients(AccessibleEvents, Int32)
RadControl.IPCHost.ProcessMessage(IPCMessage)
RadControl.ScaleControl(SizeF, BoundsSpecified)
RadControl.PerformRadAutoScale(Nullable<BoundsSpecified>)
RadControl.SetRadAutoScale(Boolean)
RadControl.IComponentTreeHandler.get_Name()
RadControl.IComponentTreeHandler.set_Name(String)
RadControl.EnableDpiScaling
RadControl.EnableRadAutoScale
RadControl.EnableRadFormInitialDpiScaling
RadControl.EnableImageDpiScaling
RadControl.EnableSvgImages
RadControl.IsTrial
RadControl.IsLoaded
RadControl.LayoutManager
RadControl.ElementTree
RadControl.UseCompatibleTextRenderingDefaultValue
RadControl.Behavior
RadControl.RootElement
RadControl.Padding
RadControl.ThemeName
RadControl.EnableTheming
RadControl.ThemeClassName
RadControl.ImageList
RadControl.ImageScalingSize
RadControl.UseCompatibleTextRendering
RadControl.MaximumSize
RadControl.MinimumSize
RadControl.Focusable
RadControl.Site
RadControl.CausesValidation
RadControl.IsInitializing
RadControl.SmallImageList
RadControl.SmallImageScalingSize
RadControl.IsDesignMode
RadControl.IsDisplayed
RadControl.FocusedElement
RadControl.AllowShowFocusCues
RadControl.ShowItemToolTips
RadControl.CommandBindings
RadControl.EnableKeyMap
RadControl.BackColor
RadControl.ForeColor
RadControl.Font
RadControl.ValidationCancel
RadControl.IComponentTreeHandler.IsDesignMode
RadControl.IComponentTreeHandler.ElementTree
RadControl.IComponentTreeHandler.Behavior
RadControl.IComponentTreeHandler.Initializing
RadControl.IComponentTreeHandler.ThemeClassName
RadControl.EnableGestures
RadControl.EnableAnalytics
RadControl.AnalyticsName
RadControl.EnableRadAccessibilityObjects
RadControl.AccessibilityRequested
RadControl.EnableCodedUITests
RadControl.EnableCodedUITestsDefaultValue
RadControl.EnableUIAutomation
RadControl.EnableUIAutomationDefaultValue
RadControl.IPCHost.Context
RadControl.ElementInvalidated
RadControl.ToolTipTextNeeded
RadControl.ScreenTipNeeded
RadControl.ThemeNameChanged
RadControl.Initialized
RadControl.PropertyChanged
RadControl.ZoomGesture
RadControl.RotateGesture
RadControl.PanGesture
RadControl.TwoFingerTapGesture
RadControl.PressAndTapGesture
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll

Syntax

public class RadRating : RadControl, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IPCHost, IAnalyticsProvider

Constructors

RadRating()

Initializes a new instance of the RadRating class. Sets up the control with default settings, makes it selectable for keyboard input, and wires the necessary events.

Declaration
public RadRating()

Properties

AutoSize

Gets or sets a value indicating whether the rating control automatically adjusts its size based on its content. When enabled, the control will resize itself to accommodate the rating items and layout requirements.

Declaration
public override bool AutoSize { get; set; }
Property Value
System.Boolean

true if the control should automatically size itself; otherwise, false. The default is false.

Overrides
RadControl.AutoSize

Caption

Gets or sets the text displayed in the caption label of the rating control. This text typically serves as a title or header for the rating interface.

Declaration
public string Caption { get; set; }
Property Value
System.String

A string representing the caption text. The default value is an empty string.

DefaultSize

Gets the default size for the rating control when no explicit size is specified. This size provides appropriate dimensions for displaying rating items with good visibility.

Declaration
protected override Size DefaultSize { get; }
Property Value
System.Drawing.Size

A System.Drawing.Size structure with default dimensions of 249x56 pixels.

Description

Gets or sets the text displayed in the description label of the rating control. This text typically provides detailed information or instructions about the rating functionality.

Declaration
public string Description { get; set; }
Property Value
System.String

A string representing the description text. The default value is an empty string.

Direction

Gets or sets the direction in which the rating items are painted and evaluated. This determines whether the rating starts from the beginning (Standard) or from the end (Reversed) of the item collection.

Declaration
public virtual RatingDirection Direction { get; set; }
Property Value
RatingDirection

A RatingDirection value that specifies the painting direction. The default is Standard.

Items

Gets the collection of rating items that make up the visual representation of the rating control. This collection contains the individual visual elements (such as stars) that users interact with to provide ratings. Items can be added, removed, or modified to customize the rating interface.

Declaration
public RadItemOwnerCollection Items { get; }
Property Value
RadItemOwnerCollection

A RadItemOwnerCollection containing the rating visual elements.

Maximum

Gets or sets the maximum value that can be assigned to the rating control. This property defines the upper bound of the rating range and affects how the rating items are interpreted.

Declaration
public double Maximum { get; set; }
Property Value
System.Double

A double value representing the maximum rating. The default value is 100.0.

Minimum

Gets or sets the minimum value that can be assigned to the rating control. This property defines the lower bound of the rating range and affects how the rating items are interpreted.

Declaration
public double Minimum { get; set; }
Property Value
System.Double

A double value representing the minimum rating. The default value is 0.0.

Orientation

Gets or sets the orientation of the rating control, determining whether rating items are arranged horizontally or vertically. This affects both the visual layout and the interaction behavior of the rating items.

Declaration
public Orientation Orientation { get; set; }
Property Value
System.Windows.Forms.Orientation

An Orientation value that specifies the layout orientation. The default is System.Windows.Forms.Orientation.Horizontal.

RatingElement

Gets the instance of RadRatingElement that provides the core functionality for this rating control. This element contains the visual styling, interaction logic, and rating calculation algorithms. The element encapsulates all the actual functionality while the control serves as a wrapper for Windows Forms integration.

Declaration
public RadRatingElement RatingElement { get; }
Property Value
RadRatingElement

A RadRatingElement that represents the rating control's core element.

ReadOnly

Gets or sets a value indicating whether the rating control is in read-only mode. When read-only, users cannot interact with the rating items to change the value, but the value can still be set programmatically. This is useful for displaying ratings without allowing user modification.

Declaration
public bool ReadOnly { get; set; }
Property Value
System.Boolean

true if the rating control is read-only; otherwise, false. The default value is false.

SelectionMode

Gets or sets the selection mode that determines how the rating value is calculated when users interact with rating items. This affects the precision and behavior of value selection during user interactions.

Declaration
public RatingSelectionMode SelectionMode { get; set; }
Property Value
RatingSelectionMode

A RatingSelectionMode value that specifies the selection behavior. The default is Precise.

Subcaption

Gets or sets the text displayed in the sub-caption label of the rating control. This text typically provides additional information or context below the main caption.

Declaration
public string Subcaption { get; set; }
Property Value
System.String

A string representing the sub-caption text. The default value is an empty string.

Text

This property is not relevant for this class.

Declaration
public override string Text { get; set; }
Property Value
System.String

Overrides
RadControl.Text

Value

Gets or sets the current rating value as a nullable double. This property represents the user's selected rating within the range defined by Minimum and Maximum properties. A null value indicates that no rating has been selected.

Declaration
public double? Value { get; set; }
Property Value
System.Nullable<System.Double>

A nullable double representing the current rating value, or null if no rating is selected.

Methods

ControlDefinesThemeForElement(RadElement)

Determines whether this control defines the theme for the specified element. This method is used by the theming system to establish which control is responsible for providing theme information to elements in the visual hierarchy.

Declaration
public override bool ControlDefinesThemeForElement(RadElement element)
Parameters
RadElement element

The RadElement to check for theme definition responsibility.

Returns
System.Boolean

true if this control defines the theme for the specified element; otherwise, false.

Overrides
RadControl.ControlDefinesThemeForElement(RadElement)

CreateChildItems(RadElement)

Creates the child items for the rating control by instantiating and adding the rating element to the root element. This method is called during control initialization to set up the visual hierarchy.

Declaration
protected override void CreateChildItems(RadElement parent)
Parameters
RadElement parent

The parent RadElement that will contain the child items.

Overrides
RadControl.CreateChildItems(RadElement)

Dispose(Boolean)

Releases the unmanaged resources used by the RadRating and optionally releases the managed resources. This method unwires events and performs cleanup operations before calling the base disposal method.

Declaration
protected override void Dispose(bool disposing)
Parameters
System.Boolean disposing

true to release both managed and unmanaged resources; false to release only unmanaged resources.

Overrides
RadControl.Dispose(Boolean)

GetRatingElement()

Creates and returns the rating element that provides the core functionality for the rating control. This method can be overridden in derived classes to provide custom rating element implementations.

Declaration
protected virtual RadRatingElement GetRatingElement()
Returns
RadRatingElement

A new instance of RadRatingElement that will handle the rating functionality.

OnValueChanged(EventArgs)

Raises the ValueChanged event with the specified event arguments. This method is called when the rating value has been successfully changed to notify any registered event handlers.

Declaration
protected virtual void OnValueChanged(EventArgs e)
Parameters
System.EventArgs e

An System.EventArgs that contains the event data.

OnValueChanging(ValueChangingEventArgs)

Raises the ValueChanging event with the specified event arguments. This method is called before a value change occurs, allowing handlers to validate or cancel the change.

Declaration
protected virtual void OnValueChanging(ValueChangingEventArgs e)
Parameters
ValueChangingEventArgs e

A ValueChangingEventArgs that contains the event data and allows cancellation of the change.

UnwireEvents()

Unwires the event handlers from the underlying rating element. This method disconnects event handlers to prevent memory leaks and ensure proper cleanup when the control is disposed.

Declaration
protected virtual void UnwireEvents()

WireEvents()

Wires the necessary event handlers to the underlying rating element. This method establishes connections between the rating element's events and the control's event handlers to enable proper event propagation and functionality.

Declaration
protected virtual void WireEvents()

Events

ValueChanged

Occurs after the value of the rating control has been changed through user interaction or programmatic assignment. This event is fired after the value change is complete and all related processing has been finished.

Declaration
public event EventHandler ValueChanged
Event Type
System.EventHandler

ValueChanging

Occurs before the value of the rating control is changed, providing an opportunity to cancel the change. This cancelable event allows validation or conditional approval of value changes before they are applied.

Declaration
public event ValueChangingEventHandler ValueChanging
Event Type
ValueChangingEventHandler

Extension Methods

SvgExtentions.Traverse<T>(T, Func<T, IEnumerable<T>>)
SvgExtentions.TraverseDepthFirst<T>(T, Func<T, IEnumerable<T>>)
Getting Started
  • Install Now
  • Demos
  • Step-by-Step Tutorial
  • Sample Applications
  • SDK Samples
  • Visual Studio Extensions
Support Resources
  • Code Library
  • Knowledge Base
  • Videos
Community
  • Forums
  • Blogs
  • Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.