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
Implements
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
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
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 |
|
See Also
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
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
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 |
|
See Also
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
Methods
add_ValueChanged(ValueChangedEventHandler)
Declaration
public void add_ValueChanged(ValueChangedEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
ValueChangedEventHandler | value |
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 |
|
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 |
remove_ValueChanged(ValueChangedEventHandler)
Declaration
public void remove_ValueChanged(ValueChangedEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
ValueChangedEventHandler | value |
Events
ValueChanged
Occurs when the value changed with Syncfusion.UI.Xaml.Controls.Input.Rating control.
Declaration
public event ValueChangedEventHandler ValueChanged
Event Type
Type |
---|
ValueChangedEventHandler |