menu

WPF

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class SfRating - WPF API Reference | Syncfusion

    Show / Hide Table of Contents

    Class SfRating

    Rating is a Windows.UI.Xaml.Controls.ItemsControl which allows the user to rate the items from the available predefined number of items.

    Inheritance
    System.Object
    SfRating
    Implements
    System.IDisposable
    Namespace: Syncfusion.Windows.Controls.Input
    Assembly: Syncfusion.SfInput.Wpf.dll
    Syntax
    [TemplateVisualState(Name = "MouseOver", GroupName = "CommonStates")]
    [TemplateVisualState(Name = "Normal", GroupName = "CommonStates")]
    [TemplateVisualState(Name = "Rated", GroupName = "CommonStates")]
    public class SfRating : ItemsControl, IDisposable

    Constructors

    SfRating()

    Initializes a new instance of the SfRating class.

    Declaration
    public SfRating()

    Fields

    AutoToolTipPrecisionProperty

    Using a DependencyProperty as the backing store for AutoToolTipPrecision. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty AutoToolTipPrecisionProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    CornerRadiusProperty

    Using a DependencyProperty as the backing store for CornerRadius. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty CornerRadiusProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    IsReadOnlyProperty

    Using a DependencyProperty as the backing store for IsReadOnly. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty IsReadOnlyProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    ItemsCountProperty

    Using a DependencyProperty as the backing store for ItemsCount. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty ItemsCountProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    ItemSizeProperty

    Using a DependencyProperty as the backing store for ItemSize. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty ItemSizeProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    ItemsSpacingProperty

    Declaration
    public static readonly DependencyProperty ItemsSpacingProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    PrecisionProperty

    Using a DependencyProperty as the backing store for Precision. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty PrecisionProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    PreviewValueProperty

    Using a DependencyProperty as the backing store for PreviewValue. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty PreviewValueProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    ShowToolTipProperty

    Using a DependencyProperty as the backing store for ShowToolTip. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty ShowToolTipProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    ToolTipForegroundProperty

    Using a DependencyProperty as the backing store for ToolTipForeground. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty ToolTipForegroundProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    ValueProperty

    Using a DependencyProperty as the backing store for Value. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty ValueProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    Properties

    AutoToolTipPrecision

    Gets or sets the value that determine number of decimal shown in the tool tip Syncfusion.UI.Xaml.Controls.Input.Rating.

    Declaration
    public int AutoToolTipPrecision { get; set; }
    Property Value
    Type Description
    System.Int32

    The default value is 1.

    See Also
    Syncfusion.UI.Xaml.Controls.Input.RatingItem

    CornerRadius

    Gets or sets a Windows.UI.Xaml.CornerRadius that represents the degree to which the corners of a Syncfusion.UI.Xaml.Controls.Input.RatingItem are rounded.

    Declaration
    public CornerRadius CornerRadius { get; set; }
    Property Value
    Type Description
    System.Windows.CornerRadius

    The corner radius.

    See Also
    Syncfusion.UI.Xaml.Controls.Input.RatingItem

    IsReadOnly

    Gets or sets a value indicating whether Syncfusion.UI.Xaml.Controls.Input.Rating is read only.

    Declaration
    public bool IsReadOnly { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if this instance is read only; otherwise, false. The default value is false.

    See Also
    Syncfusion.UI.Xaml.Controls.Input.RatingItem

    ItemsCount

    Gets or sets value that determines the count of Syncfusion.UI.Xaml.Controls.Input.RatingItem with Syncfusion.UI.Xaml.Controls.Input.Rating control.

    Declaration
    public int ItemsCount { get; set; }
    Property Value
    Type Description
    System.Int32

    The default value is zero.

    ItemSize

    Gets or sets the value for the size of Rating Item

    Declaration
    public int ItemSize { get; set; }
    Property Value
    Type
    System.Int32

    ItemsSpacing

    Gets or sets the spacing between rating items.

    Declaration
    public double ItemsSpacing { get; set; }
    Property Value
    Type Description
    System.Double

    The spacing between rating items. The default value is zero

    Precision

    Declaration
    [CLSCompliant(false)]
    public Precision Precision { get; set; }
    Property Value
    Type
    Precision

    PreviewValue

    Gets or sets the value associated with the popup.

    Declaration
    public double PreviewValue { get; set; }
    Property Value
    Type Description
    System.Double

    The default value is zero.

    See Also
    Syncfusion.UI.Xaml.Controls.Input.RatingItem

    ShowToolTip

    Gets or sets a value indicating whether show or hide the tool tip.

    Declaration
    public bool ShowToolTip { get; set; }
    Property Value
    Type Description
    System.Boolean

    true the tool tip is shown; otherwise, false. The default value is true.

    See Also
    Syncfusion.UI.Xaml.Controls.Input.RatingItem

    ToolTipForeground

    Used to set the Foreground for the ToolTip of the SfRating control

    Declaration
    public Brush ToolTipForeground { get; set; }
    Property Value
    Type
    System.Windows.Media.Brush

    Value

    Gets or sets the current value with Syncfusion.UI.Xaml.Controls.Input.Rating.

    Declaration
    public double Value { get; set; }
    Property Value
    Type Description
    System.Double

    The default value is zero.

    See Also
    Syncfusion.UI.Xaml.Controls.Input.RatingItem

    Methods

    Dispose()

    The dispose method.

    Declaration
    public void Dispose()

    GetContainerForItemOverride()

    Checks if the item is a Syncfusion.UI.Xaml.Controls.Navigation.SfRatingItem

    Declaration
    protected override DependencyObject GetContainerForItemOverride()
    Returns
    Type Description
    System.Windows.DependencyObject

    Dependency Object

    IsItemItsOwnContainerOverride(Object)

    Checks if the item is a Syncfusion.UI.Xaml.Controls.Navigation.SfRatingItem

    Declaration
    protected override bool IsItemItsOwnContainerOverride(object item)
    Parameters
    Type Name Description
    System.Object item

    object type

    Returns
    Type Description
    System.Boolean

    true if it is a RatingItem; otherwise, false

    OnApplyTemplate()

    Initializes all the child elements of Syncfusion.UI.Xaml.Controls.Input.Rating control.

    Declaration
    public override void OnApplyTemplate()

    OnKeyDown(KeyEventArgs)

    Occurs when the key is pressed.

    Declaration
    protected override void OnKeyDown(KeyEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.KeyEventArgs e

    Event Args

    OnManipulationDelta(ManipulationDeltaEventArgs)

    Occurs when the manipulation started

    Declaration
    protected override void OnManipulationDelta(ManipulationDeltaEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.ManipulationDeltaEventArgs e

    Pointer Routed Event Args

    OnMouseEnter(MouseEventArgs)

    Occurs when the pointer entered

    Declaration
    protected override void OnMouseEnter(MouseEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.MouseEventArgs e

    Pointer Routed Event Args

    OnMouseLeave(MouseEventArgs)

    Occurs when the pointer exited

    Declaration
    protected override void OnMouseLeave(MouseEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.MouseEventArgs e

    Pointer Routed Event Args

    OnMouseLeftButtonDown(MouseButtonEventArgs)

    Occurs when the pointer is pressed

    Declaration
    protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.MouseButtonEventArgs e

    Pointer Routed Event Args

    OnMouseLeftButtonUp(MouseButtonEventArgs)

    Occurs when the pointer is released

    Declaration
    protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.MouseButtonEventArgs e

    Pointer Routed Event Args

    PrepareContainerForItemOverride(DependencyObject, Object)

    Arranges the container for over ride items

    Declaration
    protected override void PrepareContainerForItemOverride(DependencyObject element, object item)
    Parameters
    Type Name Description
    System.Windows.DependencyObject element

    Dependency object type

    System.Object item

    object type

    Events

    ValueChanged

    Occurs when the value changed with Syncfusion.UI.Xaml.Controls.Input.Rating control.

    Declaration
    public event ValueChangedEventHandler ValueChanged
    Event Type
    Type
    ValueChangedEventHandler
    See Also
    Syncfusion.UI.Xaml.Controls.Input.Rating.Value

    Implements

    System.IDisposable

    See Also

    Syncfusion.UI.Xaml.Controls.Input.RatingItem
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved