Skip to content

RatingControl class

Defined in

Namespace: CrissCross.Avalonia.UI.Controls Assembly: CrissCross.Avalonia.UI.dll Full name: CrissCross.Avalonia.UI.Controls.RatingControl Modifiers: public

Summary

        Displays the rating scale with interactive star selection.
        

Applies to

net10.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net9.0, net9.0-browserwasm1.0, net9.0-desktop1.0, net8.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-macos14.5, net8.0-tvos17.2, netstandard2.1, net471

Class hierarchy
classDiagram
class RatingControl
class TemplatedControl
TemplatedControl <|-- RatingControl

Inherits from: TemplatedControl

Constructors

NameSummary
.ctor

Properties

NameSummary
ValueGets or sets the rating value.
MaxRatingGets or sets the maximum allowed rating value.
HalfStarEnabledGets or sets a value indicating whether half of the star can be selected.
StarSizeGets or sets the star size.
StarSpacingGets or sets the spacing between stars.
FilledBrushGets or sets the filled star brush.
UnfilledBrushGets or sets the unfilled star brush.
IsReadOnlyGets or sets a value indicating whether the control is read-only.

Fields

NameSummary
static ValuePropertyProperty for [Value](#
static MaxRatingPropertyProperty for [MaxRating](#
static HalfStarEnabledPropertyProperty for [HalfStarEnabled](#
static StarSizePropertyProperty for [StarSize](#
static StarSpacingPropertyProperty for [StarSpacing](#
static FilledBrushPropertyProperty for [FilledBrush](#
static UnfilledBrushPropertyProperty for [UnfilledBrush](#
static IsReadOnlyPropertyProperty for [IsReadOnly](#

Methods

NameSummary
OnApplyTemplateCalled when the control's template is applied. In simple terms, this means the method is called just before the control is displayed.
OnPropertyChangedCalled when a avalonia property changes on the object.
OnPointerPressedInvoked when an unhandled PointerPressedEvent reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
OnPointerMovedInvoked when an unhandled PointerMovedEvent reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
Inherited members