In This Article

RatingItem Class

Represents a single item in a Rating control.

[TemplateVisualState(Name = "Normal", GroupName = "CommonStates")]
[TemplateVisualState(Name = "Active", GroupName = "CommonStates")]
[TemplateVisualState(Name = "Average", GroupName = "CommonStates")]
[TemplateVisualState(Name = "Selected", GroupName = "CommonStates")]
[TemplatePart(Name = "PART_ForegroundGlyphContentPresenter", Type = typeof(ContentPresenter))]
public class RatingItem : ContentControl, IOrientedElement
Inheritance:
object Visual UIElement FrameworkElement Control ContentControl object
Implements:
IOrientedElement

Constructors

RatingItem()

Initializes an instance of the class.

public RatingItem()

Properties

ActiveGlyphTemplate

The DataTemplate to use for the item glyph when the end user's pointer actively over this item or one after it.

public DataTemplate? ActiveGlyphTemplate { get; set; }

Property Value

DataTemplate

AverageGlyphTemplate

The DataTemplate to use for the item glyph when the item is involved in rendering an average value for the overall rating.

public DataTemplate? AverageGlyphTemplate { get; set; }

Property Value

DataTemplate

ClipPercentage

The clip percentage to apply on the foreground glyph.

public double ClipPercentage { get; }

Property Value

double

NormalGlyphTemplate

The DataTemplate to use for the item glyph in the normal (unselected) state.

public DataTemplate? NormalGlyphTemplate { get; set; }

Property Value

DataTemplate

Orientation

The orientation of the element.

public Orientation Orientation { get; }

Property Value

Orientation:

The default value is Vertical.

SelectedGlyphTemplate

The DataTemplate to use for the item glyph when the item is involved in the end user's value selection.

public DataTemplate? SelectedGlyphTemplate { get; set; }

Property Value

DataTemplate

State

The current item state.

public RatingItemState State { get; }

Property Value

RatingItemState

Methods

OnApplyTemplate()

When overridden in a derived class, is invoked whenever application code or internal processes call ApplyTemplate().

public override void OnApplyTemplate()

Fields

ActiveGlyphTemplateProperty

Defines the ActiveGlyphTemplate property.

public static readonly DependencyProperty ActiveGlyphTemplateProperty

AverageGlyphTemplateProperty

Defines the AverageGlyphTemplate property.

public static readonly DependencyProperty AverageGlyphTemplateProperty

ClipPercentageProperty

Defines the ClipPercentage property.

public static readonly DependencyProperty ClipPercentageProperty

NormalGlyphTemplateProperty

Defines the NormalGlyphTemplate property.

public static readonly DependencyProperty NormalGlyphTemplateProperty

OrientationProperty

Defines the Orientation property.

public static readonly DependencyProperty OrientationProperty

SelectedGlyphTemplateProperty

Defines the SelectedGlyphTemplate property.

public static readonly DependencyProperty SelectedGlyphTemplateProperty

StateProperty

Defines the State property.

public static readonly DependencyProperty StateProperty

Extension Methods