Table of Contents

Class MudRating

Namespace
MudBlazor
Assembly
MudBlazor.dll
public class MudRating : MudComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IMudStateHasChanged
Inheritance
MudRating
Implements
Inherited Members
Extension Methods

Constructors

MudRating()

public MudRating()

Properties

ClassName

Space separated class names.

protected string ClassName { get; }

Property Value

string

Color

The color of the component. It supports the theme colors.

[Parameter]
[Category("Appearance")]
public Color Color { get; set; }

Property Value

Color

Disabled

If true, the controls will be disabled.

[Parameter]
[Category("Behavior")]
public bool Disabled { get; set; }

Property Value

bool

EmptyIcon

Non-selected item icon. Default @Icons.Material.StarBorder.

[Parameter]
[Category("Appearance")]
public string EmptyIcon { get; set; }

Property Value

string

EmptyIconColor

Non-selected item icon color.

[Parameter]
[Category("Appearance")]
public Color? EmptyIconColor { get; set; }

Property Value

Color?

FullIcon

Selected or hovered icon. Default @Icons.Material.Star.

[Parameter]
[Category("Appearance")]
public string FullIcon { get; set; }

Property Value

string

FullIconColor

Selected or hovered icon color.

[Parameter]
[Category("Appearance")]
public Color? FullIconColor { get; set; }

Property Value

Color?

HoveredValueChanged

Fires when hovered value changes. Value will be null if no rating item is hovered.

[Parameter]
public EventCallback<int?> HoveredValueChanged { get; set; }

Property Value

EventCallback<int?>

MaxValue

Max value and how many elements to click will be generated. Default: 5.

[Parameter]
[Category("Behavior")]
public int MaxValue { get; set; }

Property Value

int

Name

Input name. If not initialized, name will be a random GUID.

[Parameter]
[Category("Behavior")]
public string Name { get; set; }

Property Value

string

RatingItemsClass

User class names for RatingItems, separated by space.

[Parameter]
[Category("Appearance")]
public string? RatingItemsClass { get; set; }

Property Value

string

RatingItemsStyle

User styles for RatingItems.

[Parameter]
[Category("Appearance")]
public string? RatingItemsStyle { get; set; }

Property Value

string

ReadOnly

If true, the ratings will show without interactions.

[Parameter]
[Category("Behavior")]
public bool ReadOnly { get; set; }

Property Value

bool

Ripple

Gets or sets whether to show a ripple effect when the user clicks the button. Default is true.

[Parameter]
[Category("Appearance")]
public bool Ripple { get; set; }

Property Value

bool

SelectedValue

Selected value. This property is two-way bindable.

[Parameter]
[Category("Data")]
public int SelectedValue { get; set; }

Property Value

int

SelectedValueChanged

Fires when SelectedValue changes.

[Parameter]
public EventCallback<int> SelectedValueChanged { get; set; }

Property Value

EventCallback<int>

Size

The size of the icons.

[Parameter]
[Category("Appearance")]
public Size Size { get; set; }

Property Value

Size

Methods

BuildRenderTree(RenderTreeBuilder)

protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder RenderTreeBuilder

HandleKeyDownAsync(KeyboardEventArgs)

protected Task HandleKeyDownAsync(KeyboardEventArgs keyboardEventArgs)

Parameters

keyboardEventArgs KeyboardEventArgs

Returns

Task