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, DUCE.IResource, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IHaveResources, IQueryAmbient, IAddChild, IOrientedElement
Inheritance:
Object DispatcherObject DependencyObject Visual UIElement FrameworkElement Control ContentControl Object
Implements:
IOrientedElement

Constructors

RatingItem()

Initializes an instance of the RatingItem class.

public RatingItem()

Properties

ActiveGlyphTemplate

Gets or sets 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:

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

AverageGlyphTemplate

Gets or sets 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:

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

ClipPercentage

Gets the clip percentage to apply on the foreground glyph.

public double ClipPercentage { get; }

Property Value

Double:

The clip percentage to apply on the foreground glyph.

NormalGlyphTemplate

Gets or sets the DataTemplate to use for the item glyph in the normal (unselected) state.

public DataTemplate NormalGlyphTemplate { get; set; }

Property Value

DataTemplate:

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

Orientation

Gets the Orientation of the child element layout.

public Orientation Orientation { get; }

Property Value

Orientation:

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

SelectedGlyphTemplate

Gets or sets 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:

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

State

Gets the current item state.

public RatingItemState State { get; }

Property Value

RatingItemState:

A RatingItemState that indicates the current item state.

Methods

OnApplyTemplate()

Invoked whenever application code or internal processes call ApplyTemplate.

public override void OnApplyTemplate()

Fields

ActiveGlyphTemplateProperty

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

public static readonly DependencyProperty ActiveGlyphTemplateProperty

AverageGlyphTemplateProperty

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

public static readonly DependencyProperty AverageGlyphTemplateProperty

ClipPercentageProperty

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

public static readonly DependencyProperty ClipPercentageProperty

NormalGlyphTemplateProperty

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

public static readonly DependencyProperty NormalGlyphTemplateProperty

OrientationProperty

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

public static readonly DependencyProperty OrientationProperty

SelectedGlyphTemplateProperty

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

public static readonly DependencyProperty SelectedGlyphTemplateProperty

StateProperty

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

public static readonly DependencyProperty StateProperty

Inherited Members

Extension Methods