Ratings provide insight regarding others' opinions and experiences, and can allow the user to submit a rating of their own.
Namespace: HorusStudio.Maui.MaterialDesignControls
Inherits from: MaterialRating → ContentView
xmlns:material="clr-namespace:HorusStudio.Maui.MaterialDesignControls;assembly=HorusStudio.Maui.MaterialDesignControls"
<material:MaterialRating
Label="How do you rate....?"
Value="1"var MaterialRating = new MaterialRating()
{
Label = "How do you rate....?",
Value = 1
};Gets or sets a value that allows the automation framework to find and interact with this element.
Property type: String
Remarks: This value may only be set once on an element.
When set on this control, the AutomationId is also used as a base identifier for its internal elements:
- The label uses the identifier "{AutomationId}_Label".
- Item buttons use the identifier "{AutomationId}Item{index}".
This convention allows automated tests and accessibility tools to consistently locate all subelements of the control.
Gets or sets the spacing between characters of the label. This is a bindable property.
Property type: Double
Gets or sets the text style of the label. This is a bindable property.
Property type: FontAttributes
Defines whether an app's UI reflects text scaling preferences set in the operating system. The default value of this property is true
Property type: Boolean
Default value: true
Gets or sets the font family for the label. This is a bindable property.
Property type: String
Default value: MaterialFontFamily.Default
Defines the font size of the label. This is a bindable property.
Property type: Double
Default value: MaterialFontSize.BodyLarge - Tablet = 19 / Phone = 16
Gets or sets if rating control is enabled. This is a bindable property.
Property type: Boolean
Defines the quantity of items per row on the rating. This is a bindable property.
Property type: Int32
Default value: 5
Defines the quantity of items on the rating. This is a bindable property.
Property type: Int32
Default value: 5
Gets or sets label text. This is a bindable property.
Property type: String
Default value: null
Gets or sets the color for label. This is a bindable property.
Property type: Color
Default value: Light: MaterialLightTheme.Text - Dark: MaterialDarkTheme.Text
Defines the casing of the label. This is a bindable property.
Property type: TextTransform
Allows you to display a bitmap image on the rating when is selected. This is a bindable property.
Property type: ImageSource
Remarks: For more options have a look at ImageButton.
Allows you to display a bitmap image diferent on each rating when is selected. This is a bindable property.
Property type: IEnumerable<ImageSource>
Remarks: For more options have a look at ImageButton.
Gets or sets stroke color. This is a bindable property.
Property type: Color
Gets or sets the stroke thickness. This is a bindable property.
Property type: Double
Gets or sets a custom animation to be executed when a icon is clicked. This is a bindable property.
Property type: ITouchAnimation
Default value: null
Gets or sets an animation to be executed when an icon is clicked This is a bindable property.
Property type: TouchAnimationTypes
| Name | Value | Description |
|---|---|---|
| None | 0 | None: no animation runs. |
| Fade | 1 | Fade: Represents an animation that simulates a "fade" effect by changing the opacity over the target element. |
| Scale | 2 | Scale: Represents an animation that simulates a "sink" or "sunken" effect by scaling the target element. |
| Bounce | 3 | Bounce: Represents an animation that simulates a "sink" or "sunken" effect with a "bounce" effect when the user releases the target element. |
Default value: TouchAnimationTypes.Fade
Allows you to display a bitmap image on the rating when is unselected. This is a bindable property.
Property type: ImageSource
Remarks: For more options have a look at ImageButton.
Allows you to display a bitmap image diferent on each rating when is unselected. This is a bindable property.
Property type: IEnumerable<ImageSource>
Remarks: For more options have a look at ImageButton.
Defines the value of the Rating. This is a bindable property.
Property type: Int32
Default value: -1
Gets or sets the command to invoke when the value changes. This is a bindable property.
Property type: ICommand
Default value: null
Occurs when the value changes.
