Represents the core rating element that provides the visual and interactive functionality for rating controls.
This element manages a collection of rating visual items (typically stars), handles user interactions for value selection,
supports different selection modes and orientations, and provides comprehensive tooltip and hover feedback systems.
It serves as the main implementation behind the RadRating control wrapper.
Identifies the Value dependency property.
This property defines the current rating value with support for null values to indicate no rating.
Changes to this property trigger layout updates and visual refresh operations.
Gets or sets the text displayed in the caption label positioned above the rating items.
This text typically serves as a title or primary label for the rating interface,
providing context about what is being rated.
Gets the visual element that displays the caption text.
This provides direct access to the caption element for advanced styling, theming, or layout customization.
Gets or sets the text displayed in the description label positioned below the rating items.
This text typically provides additional information, instructions, or context about the rating,
such as explaining what different rating values represent or providing usage guidelines.
Gets the visual element that displays the description text.
This provides direct access to the description element for advanced styling, theming, or layout customization.
Gets or sets the direction in which 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,
affecting both visual appearance and value calculation during user interactions.
Gets or sets the orientation of the rating control, determining whether rating items are arranged horizontally or vertically.
Changing the orientation affects both the visual layout and the interaction behavior of rating items,
automatically updating the vertical properties of individual rating elements.
Gets the stack layout element that contains and arranges the rating visual items.
This provides direct access to the layout container for advanced customization of item arrangement,
spacing, and orientation behavior.
Gets or sets the hover value that represents the rating value under the current mouse position.
This value is used to provide visual feedback during mouse hover operations, allowing users
to preview what their rating selection would be before clicking to confirm.
Gets or sets a value indicating whether this rating element is hosted within a RadGridView control.
This property enables special handling and optimizations when the rating element is used as a grid cell editor,
automatically propagating this state to all contained rating visual elements for consistent behavior.
Gets the collection of rating visual items that represent the individual rating elements.
This collection contains the visual elements (such as stars, diamonds, or hearts) that users interact with
to provide their rating. Items can be added, removed, or customized to create different rating interfaces.
Gets or sets the maximum value that can be assigned to the rating element.
This property defines the upper bound of the rating range and affects how rating items are interpreted.
The maximum value must be greater than the minimum value to maintain a valid range.
Gets or sets the minimum value that can be assigned to the rating element.
This property defines the lower bound of the rating range and affects how rating items are interpreted.
The minimum value must be less than the maximum value to maintain a valid range.
Gets or sets the percentage threshold used for automatic value rounding near the minimum and maximum bounds.
When user selections are within this percentage of the range extremes, the value automatically snaps
to the minimum or maximum value for improved usability and to prevent accidental near-miss selections.
Gets or sets a value indicating whether the rating element 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 mode is useful for displaying ratings without allowing user modification, such as showing existing reviews or scores.
Gets or sets the internal selected value that represents the user's current selection before it's committed.
This value is used during interaction scenarios to track what the user has selected but may not
yet be reflected in the final Value property. It supports percentage-based rounding
for user-friendly value snapping near minimum and maximum bounds.
Gets or sets the selection mode that determines how rating values are calculated and quantized during user interaction.
This property controls the precision and behavior of value selection, supporting precise decimal values,
half-item increments, or full-item selections based on user interaction patterns.
Gets or sets a value indicating whether hover visual feedback should be displayed when users move their mouse over rating items.
When enabled, rating items will show visual preview of the potential selection as the mouse moves across them.
This enhances user experience by providing immediate visual feedback during interaction.
Gets or sets the text displayed in the sub-caption label positioned between the caption and rating items.
This text provides additional context or instructions for the rating interface,
typically offering more detailed information than the main caption.
Gets the visual element that displays the sub-caption text.
This provides direct access to the sub-caption element for advanced styling, theming, or layout customization.
Gets or sets the duration in milliseconds that tooltips remain visible during user interaction.
This property controls how long tooltips stay displayed when users hover over rating items,
balancing information availability with interface cleanliness.
Gets or sets the format string used for displaying tooltip values during user interaction.
This string uses standard .NET string formatting syntax to control how rating values
are presented in tooltips when users hover over rating items.
Gets or sets the offset position for tooltip display relative to the mouse cursor.
This property controls where tooltips appear in relation to the current mouse position,
allowing customization of tooltip placement to avoid cursor obstruction and improve readability.
Gets or sets the precision threshold for tooltip value updates during mouse interaction.
This value determines how much the current rating value must change before the tooltip
content is updated, preventing excessive tooltip flickering during smooth mouse movements.
Gets or sets the current rating value as a nullable double.
This is the primary property that represents the user's rating selection within the range
defined by Minimum and Maximum properties. A null value indicates
that no rating has been selected. Value changes trigger validation, range checking, and
cancelable change events.
Creates and configures the child elements that comprise the rating interface.
This method establishes the visual hierarchy including caption, sub-caption, description labels,
and the main elements layout container. It also initializes the rating items collection with
default item types and configures the overall layout properties.
Calculates and returns the zero-based index of the rating item that corresponds to the specified value.
This method performs value-to-index mapping considering the current range, direction, and orientation
settings to determine which rating item should be highlighted or selected.
Normalizes a rating value by subtracting the minimum value to create a zero-based range.
This method converts absolute rating values to relative values within the rating range,
handling null values appropriately for consistent calculations.
Calculates the relative point within a rating visual element that corresponds to the specified value.
This method determines the precise position within an individual rating item where the visual
representation should be clipped or highlighted based on the partial value it represents.
Initializes the fields and default values for the rating element.
This method sets up default tooltip configuration, rounding behavior, and visual settings
to provide a consistent baseline experience for rating interactions.
Measures the desired size of the rating element based on its child elements and available space.
This method calculates the optimal size by measuring all child elements (caption, sub-caption,
rating items layout, and description) and determining the required width and height.
Handles the click event to commit the current selected value as the rating value.
This method validates that the click occurred within the rating items area and that the element
is not in read-only mode before applying the selected value.
Handles the mouse down event to update the selected value and apply visual feedback.
This method calculates the rating value based on the mouse position, updates the selected value,
and triggers visual painting for the selected value layer.
Handles the mouse leave event by resetting all interactive visual states and hiding tooltips.
This method ensures that hover effects and visual feedback are properly cleared when the mouse
exits the rating element boundaries.
Handles mouse movement over the rating element, providing interactive feedback and tooltip display.
This method processes mouse position to determine hover values, updates visual feedback, and manages
tooltip display with precision-based updates. It respects read-only mode and handles both standard
and right-to-left layout orientations.
Handles the mouse up event by resetting the selected value visual layer.
This method clears the temporary selected value visual feedback, returning the rating items
to their standard display state after the mouse button is released.
Handles property change notifications and triggers appropriate visual updates.
This method responds to key property changes that affect visual appearance, layout,
or value representation, ensuring that the rating display remains synchronized with property values.
Handles property change notifications for the rating element.
This method responds to specific property changes such as RightToLeft and Bounds,
ensuring that visual updates and layout recalculations occur when necessary.
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.
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.
Updates the visual representation of the rating value by painting the appropriate visual layers.
This method is called when the rating value changes to ensure that the visual display accurately
reflects the current value state across all rating items.
Resets all interactive visual states including hover effects, selected value feedback, and tooltip display.
This method clears temporary visual states and hides tooltips, typically called when interaction ends
or when the mouse leaves the rating element area.
Calculates and returns the rating value based on the current mouse position within a specific rating visual element.
This method performs complex calculations considering the current selection mode, direction, orientation,
and relative mouse position to determine the appropriate rating value for user feedback and selection.
Calculates and returns the bounding rectangle that encompasses all rating visual elements.
This method determines the overall area occupied by the rating items, which is used for
hit testing, layout calculations, and interaction boundary detection.
Occurs after the value of the rating element 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.
Occurs before the value of the rating element is changed, providing an opportunity to cancel the change.
This cancelable event allows validation or conditional approval of value changes before they are applied,
enabling custom business logic or user confirmation scenarios.