Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

New-UDRating

Synopsis

Ratings provide insight regarding others' opinions and experiences, and can allow the user to submit a rating of their own.

Syntax

New-UDRating [[-Id] <String>] [[-DefaultValue] <Double>] [-Disabled] [[-EmptyLabelText] <String>] [-HighlightSelectedOnly] [[-Max] <Double>] [[-OnChange] <Endpoint>] [[-Precision] <Double>] [[-Size] <String>] [[-Value] <Double>] [[-Aria] <ScriptBlock>] [<CommonParameters>]

Description

Ratings provide insight regarding others' opinions and experiences, and can allow the user to submit a rating of their own.

Parameters

-Id

An ID for this component. If not specified, a random GUID will be used.

Required?                    false
Position?                    1
Default value                [Guid]::NewGuid().ToString()
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false

-DefaultValue

The default value for this rating.

-Disabled

Whether this rating is disabled.

-EmptyLabelText

The text to show when the rating is empty.

-HighlightSelectedOnly

Whether to highlight the selected rating only.

-Max

The maximum value for this rating.

-OnChange

A script block to call when the rating is changed. The $EventData variable will be the new value.

-Precision

The precision of the rating. Defaults to 1.

-Size

The size of the rating. Can be small, medium, or large.

-Value

The current value of the rating.

-Aria

A script block of New-UDAriaAttribute calls that supplies ARIA or role attributes for the rating control.

Common parameters

This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see about_CommonParameters.

Outputs

Examples

Example 1: Basic Rating

Creates a basic rating component.

Example 2: OnChange

Creates a rating component with an OnChange script block.

Example 3: Size

Creates a large rating component.

Example 4: Disabled

Creates a disabled rating component.

Example 5: Highlight Selected Only

Creates a rating component that only highlights the selected rating.

Last updated

Was this helpful?