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¶
| Name | Summary |
|---|---|
| .ctor |
Properties¶
| Name | Summary |
|---|---|
| Value | Gets or sets the rating value. |
| MaxRating | Gets or sets the maximum allowed rating value. |
| HalfStarEnabled | Gets or sets a value indicating whether half of the star can be selected. |
| StarSize | Gets or sets the star size. |
| StarSpacing | Gets or sets the spacing between stars. |
| FilledBrush | Gets or sets the filled star brush. |
| UnfilledBrush | Gets or sets the unfilled star brush. |
| IsReadOnly | Gets or sets a value indicating whether the control is read-only. |
Fields¶
| Name | Summary |
|---|---|
| static ValueProperty | Property for [Value](# |
| static MaxRatingProperty | Property for [MaxRating](# |
| static HalfStarEnabledProperty | Property for [HalfStarEnabled](# |
| static StarSizeProperty | Property for [StarSize](# |
| static StarSpacingProperty | Property for [StarSpacing](# |
| static FilledBrushProperty | Property for [FilledBrush](# |
| static UnfilledBrushProperty | Property for [UnfilledBrush](# |
| static IsReadOnlyProperty | Property for [IsReadOnly](# |
Methods¶
| Name | Summary |
|---|---|
| OnApplyTemplate | Called when the control's template is applied. In simple terms, this means the method is called just before the control is displayed. |
| OnPropertyChanged | Called when a avalonia property changes on the object. |
| OnPointerPressed | Invoked 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. |
| OnPointerMoved | Invoked 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. |