Show / Hide Table of Contents

Class Rating

A control that has a rating.

Inheritance
System.Object
DependencyObject
UIElement
FrameworkElement
Control
ItemsControl
Rating
Inherited Members
ItemsControl.Items
ItemsControl.ItemContainerGenerator
ItemsControl.ItemsPanel
ItemsControl.ItemsPanelProperty
ItemsControl.ItemsSource
ItemsControl.ItemsSourceProperty
ItemsControl.ItemTemplate
ItemsControl.ItemTemplateProperty
ItemsControl.DisplayMemberPath
ItemsControl.DisplayMemberPathProperty
ItemsControl.UpdateItemsPanel(ItemsPanelTemplate)
ItemsControl.OnItemsSourceChanged(IEnumerable, IEnumerable)
ItemsControl.LogicalChildren
ItemsControl.GetItemsOwner(DependencyObject)
ItemsControl.ItemsControlFromItemContainer(DependencyObject)
ItemsControl.OnTextInput(TextCompositionEventArgs)
Control.EnableBaseControlHandlingOfVisualStates
Control.ManageIsEnabled(Boolean)
Control.Background
Control.BackgroundProperty
Control.BorderBrush
Control.BorderBrushProperty
Control.BorderThickness
Control.BorderThicknessProperty
Control.FontWeight
Control.FontWeightProperty
Control.FontStyle
Control.FontStyleProperty
Control.Foreground
Control.ForegroundProperty
Control.FontFamily
Control.FontFamilyProperty
Control.FontSize
Control.FontSizeProperty
Control.TextDecorations
Control.TextDecorationsProperty
Control.Padding
Control.PaddingProperty
Control.HorizontalContentAlignment
Control.HorizontalContentAlignmentProperty
Control.VerticalContentAlignment
Control.VerticalContentAlignmentProperty
Control.TabIndex
Control.TabIndexProperty
Control.IsTabStop
Control.IsTabStopProperty
Control.TabNavigation
Control.TabNavigationProperty
Control.Template
Control.TemplateProperty
Control.ApplyTemplate()
Control.GetTemplateChild(String)
Control.Focus()
Control.HandlesScrolling
Control.OnGotFocus(RoutedEventArgs)
Control.OnLostFocus(RoutedEventArgs)
Control.CreateDomElement(Object, Object)
Control.CharacterSpacingProperty
Control.CharacterSpacing
Control.FontStretchProperty
Control.FontStretch
Control.OnDrop(DragEventArgs)
Control.OnDragEnter(DragEventArgs)
Control.OnDragLeave(DragEventArgs)
Control.OnTextInputUpdate(TextCompositionEventArgs)
Control.MeasureOverride(Size)
Control.ArrangeOverride(Size)
FrameworkElement.LayoutUpdated
FrameworkElement.SizeChanged
FrameworkElement.ResourceLookupMode
FrameworkElement.StyleProperty
FrameworkElement.Style
FrameworkElement.DefaultStyleKeyProperty
FrameworkElement.DefaultStyleKey
FrameworkElement.OverridesDefaultStyleProperty
FrameworkElement.OverridesDefaultStyle
FrameworkElement.OnVisualParentChanged(DependencyObject)
FrameworkElement.VisualChildrenCount
FrameworkElement.GetVisualChild(Int32)
FrameworkElement.Parent
FrameworkElement.AddLogicalChild(Object)
FrameworkElement.RemoveLogicalChild(Object)
FrameworkElement.TemplatedParent
FrameworkElement.Resources
FrameworkElement.IsLoaded
FrameworkElement.SetBinding(DependencyProperty, BindingBase)
FrameworkElement.SetBinding(DependencyProperty, Binding)
FrameworkElement.GetBindingExpression(DependencyProperty)
FrameworkElement.Cursor
FrameworkElement.CursorProperty
FrameworkElement.FindName(String)
FrameworkElement.Name
FrameworkElement.NameProperty
FrameworkElement.DataContext
FrameworkElement.DataContextProperty
FrameworkElement.DataContextChanged
FrameworkElement.Triggers
FrameworkElement.FlowDirectionProperty
FrameworkElement.FlowDirection
FrameworkElement.LanguageProperty
FrameworkElement.Language
FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs)
FrameworkElement.Tag
FrameworkElement.TagProperty
FrameworkElement.LoadedEvent
FrameworkElement.Loaded
FrameworkElement.Unloaded
FrameworkElement.BindingValidationError
FrameworkElement.ContextMenuProperty
FrameworkElement.ContextMenu
FrameworkElement.ContextMenuOpening
FrameworkElement.ToolTipProperty
FrameworkElement.ToolTip
FrameworkElement.INTERNAL_OnDetachedFromVisualTree()
FrameworkElement.INTERNAL_OnAttachedToVisualTree()
FrameworkElement.Height
FrameworkElement.HeightProperty
FrameworkElement.Width
FrameworkElement.WidthProperty
FrameworkElement.HorizontalAlignment
FrameworkElement.HorizontalAlignmentProperty
FrameworkElement.VerticalAlignment
FrameworkElement.VerticalAlignmentProperty
FrameworkElement.Margin
FrameworkElement.MarginProperty
FrameworkElement.MinHeight
FrameworkElement.MinHeightProperty
FrameworkElement.MinWidth
FrameworkElement.MinWidthProperty
FrameworkElement.MaxHeight
FrameworkElement.MaxHeightProperty
FrameworkElement.MaxWidth
FrameworkElement.MaxWidthProperty
FrameworkElement.ActualWidthProperty
FrameworkElement.ActualWidth
FrameworkElement.ActualHeightProperty
FrameworkElement.ActualHeight
UIElement.TransformToVisual(UIElement)
UIElement.RenderSize
UIElement.DesiredSize
UIElement.InvalidateMeasure()
UIElement.InvalidateArrange()
UIElement.Measure(Size)
UIElement.Arrange(Rect)
UIElement.UpdateLayout()
UIElement.DragEnter
UIElement.DragLeave
UIElement.Drop
UIElement.DragOver
UIElement.CacheMode
UIElement.CacheModeProperty
UIElement.Projection
UIElement.ProjectionProperty
UIElement.VisualParent
UIElement.AddVisualChild(UIElement)
UIElement.RemoveVisualChild(UIElement)
UIElement.OnVisualChildrenChanged(DependencyObject, DependencyObject)
UIElement.XamlSourcePath
UIElement.ClipToBounds
UIElement.ClipToBoundsProperty
UIElement.ClipProperty
UIElement.Clip
UIElement.IsEnabledProperty
UIElement.IsEnabled
UIElement.IsEnabledChanged
UIElement.EffectProperty
UIElement.Effect
UIElement.RenderTransformProperty
UIElement.RenderTransform
UIElement.RenderTransformOriginProperty
UIElement.RenderTransformOrigin
UIElement.UseLayoutRounding
UIElement.UseLayoutRoundingProperty
UIElement.Visibility
UIElement.VisibilityProperty
UIElement.IsVisibleProperty
UIElement.IsVisible
UIElement.IsVisibleChanged
UIElement.OpacityProperty
UIElement.Opacity
UIElement.OpacityMaskProperty
UIElement.OpacityMask
UIElement.IsHitTestVisible
UIElement.IsHitTestVisibleProperty
UIElement.AllowDrop
UIElement.AllowDropProperty
UIElement.CaptureMouse()
UIElement.IsMouseCaptured
UIElement.ReleaseMouseCapture()
UIElement.AllowScrollOnTouchMove
UIElement.AllowScrollOnTouchMoveProperty
UIElement.AddHandler(RoutedEvent, Delegate, Boolean)
UIElement.RemoveHandler(RoutedEvent, Delegate)
UIElement.MouseMoveEvent
UIElement.MouseMove
UIElement.OnMouseMove(MouseEventArgs)
UIElement.MouseLeftButtonDownEvent
UIElement.MouseLeftButtonDown
UIElement.MouseRightButtonDownEvent
UIElement.MouseRightButtonDown
UIElement.OnMouseRightButtonDown(MouseButtonEventArgs)
UIElement.MouseWheelEvent
UIElement.MouseWheel
UIElement.OnMouseWheel(MouseWheelEventArgs)
UIElement.MouseLeftButtonUpEvent
UIElement.MouseLeftButtonUp
UIElement.MouseEnterEvent
UIElement.MouseEnter
UIElement.MouseLeaveEvent
UIElement.MouseLeave
UIElement.TextInputStartEvent
UIElement.TextInputStart
UIElement.OnTextInputStart(TextCompositionEventArgs)
UIElement.TextInputEvent
UIElement.TextInput
UIElement.TextInputUpdateEvent
UIElement.TextInputUpdate
UIElement.TappedEvent
UIElement.Tapped
UIElement.OnTapped(TappedRoutedEventArgs)
UIElement.MouseRightButtonUpEvent
UIElement.MouseRightButtonUp
UIElement.OnMouseRightButtonUp(MouseButtonEventArgs)
UIElement.KeyDownEvent
UIElement.KeyDown
UIElement.KeyUpEvent
UIElement.KeyUp
UIElement.OnKeyUp(KeyEventArgs)
UIElement.GotFocusEvent
UIElement.GotFocus
UIElement.LostFocusEvent
UIElement.LostFocus
UIElement.LostMouseCapture
UIElement.OnLostMouseCapture(MouseEventArgs)
UIElement.INTERNAL_AttachToDomEvents()
UIElement.INTERNAL_DetachFromDomEvents()
DependencyObject.GetValue(DependencyProperty)
DependencyObject.SetCurrentValue(DependencyProperty, Object)
DependencyObject.ReadLocalValue(DependencyProperty)
DependencyObject.SetValue(DependencyProperty, Object)
DependencyObject.SetValue(DependencyPropertyKey, Object)
DependencyObject.CoerceValue(DependencyProperty)
DependencyObject.Dispatcher
DependencyObject.ClearValue(DependencyProperty)
DependencyObject.ClearValue(DependencyPropertyKey)
DependencyObject.CheckAccess()
DependencyObject.GetAnimationBaseValue(DependencyProperty)
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: System.Windows.Controls
Assembly: OpenSilver.Controls.Input.Toolkit.dll
Syntax
[StyleTypedProperty(Property = "ItemContainerStyle", StyleTargetType = typeof(RatingItem))]
public class Rating : ItemsControl, IControl, IFrameworkElement, IUIElement, IDependencyObject

Constructors

| Improve this Doc View Source

Rating()

Initializes a new instance of the Rating control.

Declaration
public Rating()

Fields

| Improve this Doc View Source

DisplayValueProperty

Identifies the DisplayValue dependency property.

Declaration
protected static readonly DependencyProperty DisplayValueProperty
Field Value
Type Description
DependencyProperty
| Improve this Doc View Source

IsReadOnlyProperty

Identifies the IsReadOnly dependency property.

Declaration
public static readonly DependencyProperty IsReadOnlyProperty
Field Value
Type Description
DependencyProperty
| Improve this Doc View Source

ItemContainerStyleProperty

Identifies the ItemContainerStyle dependency property.

Declaration
public static readonly DependencyProperty ItemContainerStyleProperty
Field Value
Type Description
DependencyProperty
| Improve this Doc View Source

ItemCountProperty

Identifies the ItemCount dependency property.

Declaration
public static readonly DependencyProperty ItemCountProperty
Field Value
Type Description
DependencyProperty
| Improve this Doc View Source

SelectionModeProperty

Identifies the SelectionMode dependency property.

Declaration
public static readonly DependencyProperty SelectionModeProperty
Field Value
Type Description
DependencyProperty
| Improve this Doc View Source

ValueProperty

Identifies the Value dependency property.

Declaration
public static readonly DependencyProperty ValueProperty
Field Value
Type Description
DependencyProperty

Properties

| Improve this Doc View Source

DisplayValue

Gets or sets the actual value of the Rating control.

Declaration
protected double DisplayValue { get; set; }
Property Value
Type Description
System.Double
| Improve this Doc View Source

IsReadOnly

Gets or sets a value indicating whether the Rating is read-only.

Declaration
public bool IsReadOnly { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

ItemContainerStyle

Gets or sets the item container style.

Declaration
public Style ItemContainerStyle { get; set; }
Property Value
Type Description
Style
| Improve this Doc View Source

ItemCount

Gets or sets the number of rating items.

Declaration
public int ItemCount { get; set; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

SelectionMode

Gets or sets the selection mode.

Declaration
public RatingSelectionMode SelectionMode { get; set; }
Property Value
Type Description
RatingSelectionMode
| Improve this Doc View Source

Value

Gets or sets the rating value.

Declaration
[TypeConverter(typeof(NullableConverter<double>))]
public double? Value { get; set; }
Property Value
Type Description
System.Nullable<System.Double>

Methods

| Improve this Doc View Source

ClearContainerForItemOverride(DependencyObject, Object)

This method clears a container used to host an item.

Declaration
protected override void ClearContainerForItemOverride(DependencyObject element, object item)
Parameters
Type Name Description
DependencyObject element

The container that hosts the item.

System.Object item

The item hosted in the container.

Overrides
ItemsControl.ClearContainerForItemOverride(DependencyObject, Object)
| Improve this Doc View Source

GetContainerForItemOverride()

This method returns a container for the item.

Declaration
protected override DependencyObject GetContainerForItemOverride()
Returns
Type Description
DependencyObject

A container for the item.

Overrides
ItemsControl.GetContainerForItemOverride()
| Improve this Doc View Source

IsItemItsOwnContainerOverride(Object)

Gets a value indicating whether the item is its own container.

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

The item which may be a container.

Returns
Type Description
System.Boolean

A value indicating whether the item is its own container.

Overrides
ItemsControl.IsItemItsOwnContainerOverride(Object)
| Improve this Doc View Source

OnApplyTemplate()

Applies control template to the items control.

Declaration
public override void OnApplyTemplate()
Overrides
Control.OnApplyTemplate()
| Improve this Doc View Source

OnCreateAutomationPeer()

Returns a RatingItemAutomationPeer for use by the Silverlight automation infrastructure.

Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
Type Description
AutomationPeer

A RatingItemAutomationPeer object for the RatingItem.

Overrides
UIElement.OnCreateAutomationPeer()
| Improve this Doc View Source

OnIsReadOnlyChanged(Boolean, Boolean)

IsReadOnlyProperty property changed handler.

Declaration
protected virtual void OnIsReadOnlyChanged(bool oldValue, bool newValue)
Parameters
Type Name Description
System.Boolean oldValue

Old value.

System.Boolean newValue

New value.

| Improve this Doc View Source

OnItemContainerStyleChanged(Style)

ItemContainerStyleProperty property changed handler.

Declaration
protected virtual void OnItemContainerStyleChanged(Style newValue)
Parameters
Type Name Description
Style newValue

New value.

| Improve this Doc View Source

OnItemsChanged(NotifyCollectionChangedEventArgs)

Updates the control when the items change.

Declaration
protected override void OnItemsChanged(NotifyCollectionChangedEventArgs e)
Parameters
Type Name Description
System.Collections.Specialized.NotifyCollectionChangedEventArgs e

Information about the event.

Overrides
ItemsControl.OnItemsChanged(NotifyCollectionChangedEventArgs)
| Improve this Doc View Source

OnKeyDown(KeyEventArgs)

Provides handling for the KeyDown event when a key is pressed while the control has focus.

Declaration
protected override void OnKeyDown(KeyEventArgs e)
Parameters
Type Name Description
KeyEventArgs e

A KeyEventArgs that contains the event data.

Overrides
UIElement.OnKeyDown(KeyEventArgs)
Exceptions
Type Condition
System.ArgumentNullException

e is null.

| Improve this Doc View Source

OnMouseEnter(MouseEventArgs)

This method is invoked when the mouse enters the rating item.

Declaration
protected override void OnMouseEnter(MouseEventArgs e)
Parameters
Type Name Description
MouseEventArgs e

Information about the event.

Overrides
UIElement.OnMouseEnter(MouseEventArgs)
| Improve this Doc View Source

OnMouseLeave(MouseEventArgs)

This method is invoked when the mouse leaves the rating item.

Declaration
protected override void OnMouseLeave(MouseEventArgs e)
Parameters
Type Name Description
MouseEventArgs e

Information about the event.

Overrides
UIElement.OnMouseLeave(MouseEventArgs)
| Improve this Doc View Source

OnMouseLeftButtonDown(MouseButtonEventArgs)

Provides handling for the Rating's MouseLeftButtonDown event.

Declaration
protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
Parameters
Type Name Description
MouseButtonEventArgs e

Event arguments.

Overrides
UIElement.OnMouseLeftButtonDown(MouseButtonEventArgs)
| Improve this Doc View Source

OnMouseLeftButtonUp(MouseButtonEventArgs)

Provides handling for the Rating's MouseLeftButtonUp event.

Declaration
protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e)
Parameters
Type Name Description
MouseButtonEventArgs e

Event arguments.

Overrides
UIElement.OnMouseLeftButtonUp(MouseButtonEventArgs)
| Improve this Doc View Source

OnRatingItemValueSelected(RatingItem, Double)

This method is invoked when the rating item value is changed.

Declaration
protected virtual void OnRatingItemValueSelected(RatingItem ratingItem, double newValue)
Parameters
Type Name Description
RatingItem ratingItem

The rating item that has changed.

System.Double newValue

The new value.

| Improve this Doc View Source

OnSelectionModeChanged(RatingSelectionMode, RatingSelectionMode)

SelectionModeProperty property changed handler.

Declaration
protected virtual void OnSelectionModeChanged(RatingSelectionMode oldValue, RatingSelectionMode newValue)
Parameters
Type Name Description
RatingSelectionMode oldValue

Old value.

RatingSelectionMode newValue

New value.

| Improve this Doc View Source

OnValueChanged(Nullable<Double>, Nullable<Double>)

ValueProperty property changed handler.

Declaration
protected virtual void OnValueChanged(double? oldValue, double? newValue)
Parameters
Type Name Description
System.Nullable<System.Double> oldValue

Old value.

System.Nullable<System.Double> newValue

New value.

| Improve this Doc View Source

PrepareContainerForItemOverride(DependencyObject, Object)

This method prepares a container to host an item.

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

The container.

System.Object item

The item hosted in the container.

Overrides
ItemsControl.PrepareContainerForItemOverride(DependencyObject, Object)

Events

| Improve this Doc View Source

ValueChanged

This event is raised when the value of the rating is changed.

Declaration
public event RoutedPropertyChangedEventHandler<double?> ValueChanged
Event Type
Type Description
RoutedPropertyChangedEventHandler<System.Nullable<System.Double>>

Extension Methods

DependencyObjectHelper.GetSelfAndAncestors(DependencyObject)
UIElementExtendedRoutedEventExtensions.AddHandler(UIElement, ExtendedRoutedEvent, Delegate, Boolean)
UIElementExtendedRoutedEventExtensions.RemoveHandler(UIElement, ExtendedRoutedEvent, Delegate)
ItemsControlExtensions.GetItemsHost(ItemsControl)
ItemsControlExtensions.GetScrollHost(ItemsControl)
ItemsControlExtensions.GetContainers(ItemsControl)
ItemsControlExtensions.GetContainers<TContainer>(ItemsControl)
ItemsControlExtensions.GetItemsAndContainers(ItemsControl)
ItemsControlExtensions.GetItemsAndContainers<TContainer>(ItemsControl)
VisualTreeExtensions.GetVisualAncestors(DependencyObject)
VisualTreeExtensions.GetVisualAncestorsAndSelf(DependencyObject)
VisualTreeExtensions.GetVisualChildren(DependencyObject)
VisualTreeExtensions.GetVisualChildrenAndSelf(DependencyObject)
VisualTreeExtensions.GetVisualDescendants(DependencyObject)
VisualTreeExtensions.GetVisualDescendantsAndSelf(DependencyObject)
VisualTreeExtensions.GetVisualSiblings(DependencyObject)
VisualTreeExtensions.GetVisualSiblingsAndSelf(DependencyObject)
VisualTreeExtensions.GetBoundsRelativeTo(FrameworkElement, UIElement)
VisualTreeExtensions.InvokeOnLayoutUpdated(FrameworkElement, Action)
  • Improve this Doc
  • View Source