Rating Class
Represents a rating control that allows the user to set or view a rating of an entity.
public class Rating : ItemsControl, IOrientedElement
- Inheritance:
- object 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
ItemCount
Gets or sets the number of items to display in the rating.
public int ItemCount { get; set; }
Property Value
- int:
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
- 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.
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