In This Article

Rating Class

Represents a rating control that allows the user to set or view a rating of an entity.

public class Rating : ItemsControl, DUCE.IResource, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IHaveResources, IQueryAmbient, IAddChild, IGeneratorHost, IOrientedElement
Inheritance:
Object DispatcherObject DependencyObject Visual UIElement FrameworkElement Control ItemsControl Object
Implements:
IOrientedElement

Constructors

Rating()

Initializes an instance of the Rating class.

public Rating()

Properties

AverageValue

Gets or sets the average rating value currently presented by the control.

public double AverageValue { get; set; }

Property Value

Double:

The average rating value currently presented by the control. The default value is 0.0.

ClearValueCommand

Gets the ICommand that can clear the value.

public ICommand ClearValueCommand { get; }

Property Value

ICommand:

The ICommand that can clear the value.

ItemCount

Gets or sets the number of items to display in the rating.

public int ItemCount { get; set; }

Property Value

Int32:

The number of items to display in the rating. The default value is 0.

Orientation

Gets or sets the Orientation of the child element layout.

public Orientation Orientation { get; set; }

Property Value

Orientation:

The Orientation of the child element layout. The default value is Horizontal.

Value

Gets or sets the rating value currently presented by the control, if any.

public double? Value { get; set; }

Property Value

Nullable<Double>:

The rating value currently presented by the control, if any. The default value is null.

Methods

OnCreateAutomationPeer()

Returns an AutomationPeer object for this control instance.

protected override AutomationPeer OnCreateAutomationPeer()

Returns

AutomationPeer:

An AutomationPeer instance.

OnItemsChanged(NotifyCollectionChangedEventArgs)

Occurs when the Items collection has changed.

protected override void OnItemsChanged(NotifyCollectionChangedEventArgs e)
Parameter Type Description
e NotifyCollectionChangedEventArgs

The NotifyCollectionChangedEventArgs that contains the event data.

OnKeyDown(KeyEventArgs)

Occurs when a key is pressed.

protected override void OnKeyDown(KeyEventArgs e)
Parameter Type Description
e KeyEventArgs

The KeyEventArgs that contains the event data.

Events

ValueChanged

Occurs after the Value property value changes.

public event EventHandler ValueChanged

Event Type

EventHandler

Fields

AverageValueProperty

Identifies the AverageValue dependency property. This field is read-only.

public static readonly DependencyProperty AverageValueProperty

ItemCountProperty

Identifies the read-only ItemCount dependency property. This field is read-only.

public static readonly DependencyProperty ItemCountProperty

OrientationProperty

Identifies the Orientation dependency property. This field is read-only.

public static readonly DependencyProperty OrientationProperty

ValueProperty

Identifies the Value dependency property. This field is read-only.

public static readonly DependencyProperty ValueProperty

Inherited Members

Extension Methods