RatingVisualItem
Provides the fill, border, and layout behavior shared by visual items used to draw rating symbols.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class RatingVisualItem : RadItem, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemRatingVisualItem...
Derived Classes:
Implements:
Inherited Members
Constructors
public RatingVisualItem()
Fields
Identifies the property that activates grid-specific visual states on a rating item.
public static RadProperty IsInRadGridViewProperty
Properties
Gets the border primitive that draws this item's outline.
public BorderPrimitive Border { get; }
Gets the fill primitive that paints the background behind the rating symbol.
public FillPrimitive Fill { get; }
Gets or sets whether this item uses the visual state for rating items hosted in a grid.
public virtual bool IsInRadGridView { get; set; }
Methods
Combines the initial padding and border size with the measured child size, then caps the result to the available size.
protected virtual SizeF CalculateDesiredSize(SizeF availableSize, SizeF desiredSize, SizeF elementsDesiredSize)
The maximum size available to the item.
desiredSizeSizeFThe size already required by the item's padding and border.
elementsDesiredSizeSizeFThe size required by the item's child elements.
Returns:The combined desired size, limited to availableSize.
Creates the fill and border primitives used to paint this item.
protected override void CreateChildElements()
Overrides:
Calculates border insets from the configured border style, or returns no insets when drawing is being checked.
Calculates the item client rectangle by removing padding and preventing negative dimensions.
protected override RectangleF GetClientRectangle(SizeF finalSize)
The size from which to calculate the client rectangle.
Returns:The padded client rectangle with nonnegative width and height.
Overrides:
Enables painting for the rating item's fill and border primitives.
protected override void InitializeFields()
Overrides:
Measures child elements using their fit-to-size modes and the item's automatic-sizing setting.
protected virtual SizeF MeasureElements(SizeF availableSize, SizeF clientSize, Padding borderThickness)
The maximum size available to the item and its children.
clientSizeSizeFThe client size after the item's padding is removed.
borderThicknessPaddingThe insets used when measuring children that fit to the parent's padding.
Returns:The measured child size, adjusted for padding and border where required.
Measures the children and derives the desired size from their content, padding, and border. When automatic sizing is disabled, the item's current size supplies the content size.