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, IContainItemStorage, IOrientedElement
Inheritance:
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 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

System.Double:

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

ClearValueCommand

Gets the System.Windows.Input.ICommand that can clear the value.

public ICommand ClearValueCommand { get; }

Property Value

System.Windows.Input.ICommand:

The System.Windows.Input.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

System.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

System.Windows.Controls.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

System.Nullable<System.Double>:

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

Methods

OnCreateAutomationPeer()

Returns an System.Windows.Automation.Peers.AutomationPeer object for this control instance.

protected override AutomationPeer OnCreateAutomationPeer()

Returns

System.Windows.Automation.Peers.AutomationPeer:

An System.Windows.Automation.Peers.AutomationPeer instance.

OnItemsChanged(NotifyCollectionChangedEventArgs)

Occurs when the Items collection has changed.

protected override void OnItemsChanged(NotifyCollectionChangedEventArgs e)
Parameter Type Description
e System.Collections.Specialized.NotifyCollectionChangedEventArgs

The System.Collections.Specialized.NotifyCollectionChangedEventArgs that contains the event data.

OnKeyDown(KeyEventArgs)

Occurs when a key is pressed.

protected override void OnKeyDown(KeyEventArgs e)
Parameter Type Description
e System.Windows.Input.KeyEventArgs

The System.Windows.Input.KeyEventArgs that contains the event data.

Events

ValueChanged

Occurs after the Value property value changes.

public event EventHandler ValueChanged

Event Type

System.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

  • System.Object.ToString()
  • System.Object.Equals(System.Object)
  • System.Object.Equals(System.Object, System.Object)
  • System.Object.ReferenceEquals(System.Object, System.Object)
  • System.Object.GetHashCode()
  • System.Object.GetType()
  • System.Object.MemberwiseClone()

Extension Methods