Class SfRatingItem
Represent a selectable item inside the SfRating control.
Control style and template
Key | Description |
---|---|
SyncfusionRatingRatedItemFill | Used to set the fill color of the rated item. |
SyncfusionRatingUnratedItemFill | Used to set the fill color of the unrated item. |
SyncfusionRatingItemFillPointerOver | Used to set the selected hover fill color of the item. |
SyncfusionRatingItemFillDisabled | Used to set the fill color of the disabled item. |
SyncfusionRatingRatedItemStroke | Used to set the stroke color of the rated item. |
SyncfusionRatingUnratedItemStroke | Used to set the stroke color of the unrated item. |
SyncfusionRatingItemStrokePointerOver | Used to set the selected hover stroke color of the item. |
SyncfusionRatingItemStrokeDisabled | Used to set the stroke color of the disabled item. |
SyncfusionRatingItemToolTipBorderBrush | Used to set the border brush color of the tooltip of the item. |
SyncfusionRatingItemToolTipFont | Used to set the font family of the tooltip in the rating item. |
SyncfusionRatingItemToolTipBackground | Used to set the background color of the tooltip. |
Inheritance
System.Object
SfRatingItem
Namespace: Syncfusion.UI.Xaml.Editors
Assembly: Syncfusion.Editors.WinUI.dll
Syntax
public class SfRatingItem : SelectorItem
Examples
<Grid.Resources>
<ResourceDictionary>
<ResourceDictionary.ThemeDictionaries>
<ResourceDictionary x:Key="Light">
<SolidColorBrush x:Key="SyncfusionRatingRatedItemFill"
Color="Blue" />
</ResourceDictionary>
<ResourceDictionary x:Key="Dark">
<SolidColorBrush x:Key="SyncfusionRatingRatedItemFill"
Color="Yellow" />
</ResourceDictionary>
</ResourceDictionary.ThemeDictionaries>
</ResourceDictionary>
</Grid.resources>
<syncfusion:SfRating ItemsCount="5"/>
Constructors
SfRatingItem()
Initializes a new instance of the SfRatingItem class.
Declaration
public SfRatingItem()
Methods
OnApplyTemplate()
Build the visual tree for the SfRatingItem class.
Declaration
protected override void OnApplyTemplate()
OnPointerExited(PointerRoutedEventArgs)
Occurs when pointer is exited from the rating item.
Declaration
protected override void OnPointerExited(PointerRoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.UI.Xaml.Input.PointerRoutedEventArgs | e | The Microsoft.UI.Xaml.Input.PointerRoutedEventArgs that contains the event data. |
OnPointerMoved(PointerRoutedEventArgs)
Occurs when pointer is moved inside the rating item.
Declaration
protected override void OnPointerMoved(PointerRoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.UI.Xaml.Input.PointerRoutedEventArgs | e | The Microsoft.UI.Xaml.Input.PointerRoutedEventArgs that contains the event data. |
OnPointerReleased(PointerRoutedEventArgs)
Occurs when pointer released in the rating item.
Declaration
protected override void OnPointerReleased(PointerRoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.UI.Xaml.Input.PointerRoutedEventArgs | e | The Microsoft.UI.Xaml.Input.PointerRoutedEventArgs that contains the event data. |