Class
RadRating

Rating control is a flexible UI component that allows users to intuitively rate by selecting number of items [stars].

Definition

Namespace:Telerik.Windows.Controls

Assembly:Telerik.Windows.Controls.Input.dll

Syntax:

cs-api-definition
[TelerikToolboxCategory("Input")]
[Themable]
public class RadRating : ItemsControl, IUpdateVisualState

Inheritance: objectRadRating

Implements: IUpdateVisualState

Constructors

RadRating()

Initializes a new instance of the RadRating class.

Declaration

cs-api-definition
public RadRating()

Fields

IsReadOnlyProperty

Identifies the IsReadOnly dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsReadOnlyProperty

Field Value

DependencyProperty

NumberOfItemsToGenerateProperty

Identifies the NumberOfItemsToGenerateProperty dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty NumberOfItemsToGenerateProperty

Field Value

DependencyProperty

PrecisionProperty

Identifies the Precision dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty PrecisionProperty

Field Value

DependencyProperty

ValueProperty

Identifies the Value dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ValueProperty

Field Value

DependencyProperty

Properties

IsReadOnly

Gets or sets a value indicating whether this instance is read only.

Declaration

cs-api-definition
public bool IsReadOnly { get; set; }

Property Value

bool

NumberOfItemsToGenerate

Gets or sets the number of items to generate.

Declaration

cs-api-definition
public int NumberOfItemsToGenerate { get; set; }

Property Value

int

The number of items to generate.

Precision

Gets or sets the rating precision.

Declaration

cs-api-definition
public RatingPrecision Precision { get; set; }

Property Value

RatingPrecision

The precision.

Value

Gets or sets the value.

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Naming", "CA1721:PropertyNamesShouldNotMatchGetMethods")]
public double? Value { get; set; }

Property Value

double?

The value.

Methods

ClearContainerForItemOverride(DependencyObject, object)

Undoes the effects of the method.

Declaration

cs-api-definition
protected override void ClearContainerForItemOverride(DependencyObject element, object item)

Parameters

element

DependencyObject

The container element.

item

object

The item.

GetContainerForItemOverride()

Creates or identifies the element that is used to display the given item.

Declaration

cs-api-definition
protected override DependencyObject GetContainerForItemOverride()

Returns

DependencyObject

The element that is used to display the given item.

IsItemItsOwnContainerOverride(object)

Determines if the specified item is (or is eligible to be) its own container.

Declaration

cs-api-definition
protected override bool IsItemItsOwnContainerOverride(object item)

Parameters

item

object

Returns

bool

OnApplyTemplate()

When overridden in a derived class, is invoked whenever application code or internal processes (such as a rebuilding layout pass) call .

Declaration

cs-api-definition
public override void OnApplyTemplate()

OnCreateAutomationPeer()

Creates new ratingAutomationPeer when needed.

Declaration

cs-api-definition
protected override AutomationPeer OnCreateAutomationPeer()

Returns

AutomationPeer

OnInitialized(EventArgs)

Raises the event. This method is invoked whenever is set to true internally.

Declaration

cs-api-definition
protected override void OnInitialized(EventArgs e)

Parameters

e

EventArgs

The RoutedEventArgs that contains the event data.

OnItemsChanged(NotifyCollectionChangedEventArgs)

Called when the value of the property changes.

Declaration

cs-api-definition
protected override void OnItemsChanged(NotifyCollectionChangedEventArgs e)

Parameters

e

NotifyCollectionChangedEventArgs

A NotifyCollectionChangedEventArgs that contains the event data.

OnRatingItemValueSelected(RadRatingItem, double)

Called when [rating item value selected].

Declaration

cs-api-definition
protected void OnRatingItemValueSelected(RadRatingItem ratingItem, double newValue)

Parameters

ratingItem

RadRatingItem

The rating item.

newValue

double

The new value.

PrepareContainerForItemOverride(DependencyObject, object)

Prepares the specified element to display the specified item.

Declaration

cs-api-definition
protected override void PrepareContainerForItemOverride(DependencyObject element, object item)

Parameters

element

DependencyObject

Element used to display the specified item.

item

object

Specified item.

ResetTheme()

Resets the theme.

Declaration

cs-api-definition
public void ResetTheme()

Events

ValueChanged

Occurs when value changed.

Declaration

cs-api-definition
public event RoutedPropertyChangedEventHandler<double?> ValueChanged

Event Value

RoutedPropertyChangedEventHandler<double?>