Skip to main content

RatingControl

C# API / Fluence.Wpf.Controls

  • Assembly: Fluence.Wpf
  • Namespace: Fluence.Wpf.Controls
public class RatingControl : Control

A Fluent Design star-based rating control. Renders up to MaxRating star glyphs using Segoe Fluent Icons (U+E734 StarEmpty / U+E735 StarFilled). Authority: WinUI 3 RatingControl_themeresources.xaml + RatingControl.xaml. Brush states: AccentFillColorDefaultBrush (set, and while hovering to preview a higher rating, still-set stars at or below the current value), ControlAltFillColorTertiaryBrush (the hover-preview stars above the current value), TextFillColorSecondaryBrush (unset), TextFillColorDisabledBrush (disabled, set stars only - disabled unset stars stay TextFillColorSecondaryBrush).

Base type: Control (including inherited WPF and .NET members)

C# source

Constructors​

RatingControl​

public RatingControl()

Creates a new RatingControl instance.

Properties​

Caption​

public string Caption { get; set; }

Gets or sets the optional caption text shown after the stars.

IsReadOnly​

public bool IsReadOnly { get; set; }

Gets or sets whether the user can change the rating. When true, the control is display-only.

MaxRating​

public int MaxRating { get; set; }

Gets or sets the maximum number of stars displayed. Default is 5.

Value​

public double Value { get; set; }

Gets or sets the current rating value (0 to MaxRating).

Methods​

OnApplyTemplate​

public override void OnApplyTemplate()

Documentation inherited from the Control API.

OnCreateAutomationPeer​

protected override AutomationPeer OnCreateAutomationPeer()

Documentation inherited from the Control API.

OnKeyDown​

protected override void OnKeyDown(KeyEventArgs e)

Documentation inherited from the Control API.

Dependency property identifiers​

Use these identifiers with WPF property APIs. The matching CLR properties appear above when the control exposes them.

CaptionProperty​

public static readonly DependencyProperty CaptionProperty

Identifies the Caption dependency property.

IsReadOnlyProperty​

public static readonly DependencyProperty IsReadOnlyProperty

Identifies the IsReadOnly dependency property.

MaxRatingProperty​

public static readonly DependencyProperty MaxRatingProperty

Identifies the MaxRating dependency property.

ValueProperty​

public static readonly DependencyProperty ValueProperty

Identifies the Value dependency property.