menu

WinForms

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

    Show / Hide Table of Contents

    Class RatingControl

    Rating Control Class in which all the functionalities of the rating control has been defined.

    Inheritance
    System.Object
    BaseControl
    RatingControl
    Implements
    IThemeProvider
    IVisualStyle
    System.IDisposable
    Inherited Members
    BaseControl.CanApplyTheme
    BaseControl.CanOverrideStyle
    BaseControl.ControlName
    BaseControl.GetActiveThemeName()
    BaseControl.IsVisualStyleEnabled
    BaseControl.IThemeProvider.BaseThemeName
    BaseControl.IVisualStyle.VisualTheme
    BaseControl.RaiseThemeChanged(Object, ThemeChangedEventArgs)
    BaseControl.ThemeName
    BaseControl.ThemeNameChanged
    Namespace: Syncfusion.Windows.Forms.Tools
    Assembly: Syncfusion.Tools.Windows.dll
    Syntax
    public class RatingControl : BaseControl, IThemeProvider, IVisualStyle, IDisposable

    Constructors

    RatingControl()

    Declaration
    public RatingControl()

    Properties

    ApplyGradientColors

    Gets or Sets whether to apply the gradient colors

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

    DrawMode

    Gets or Sets the Drawmode

    Declaration
    public Drawmodes DrawMode { get; set; }
    Property Value
    Type
    Drawmodes

    Images

    Get or set for the CustomImageCollection

    Declaration
    public CustomImageCollection Images { get; set; }
    Property Value
    Type
    CustomImageCollection

    ItemBackColor

    Gets or Sets ShapeBackColor

    Declaration
    public Color ItemBackColor { get; set; }
    Property Value
    Type
    System.Drawing.Color

    ItemBorderColor

    Gets or Sets the Shapes border color

    Declaration
    public Color ItemBorderColor { get; set; }
    Property Value
    Type
    System.Drawing.Color

    ItemBorderWeight

    Gets or Sets the Shape Border weight

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

    ItemHighlightColor

    Gets or Sets the Shape highlight color

    Declaration
    public Color ItemHighlightColor { get; set; }
    Property Value
    Type
    System.Drawing.Color

    ItemHighlightEndColor

    Gets or Sets the Shape highlight color

    Declaration
    public Color ItemHighlightEndColor { get; set; }
    Property Value
    Type
    System.Drawing.Color

    ItemHighlightStartColor

    Gets or Sets the Gradient Highlight Start Color

    Declaration
    public Color ItemHighlightStartColor { get; set; }
    Property Value
    Type
    System.Drawing.Color

    ItemsCount

    Gets or Sets the number of shapes to be drawn

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

    ItemSelectionColor

    Gets or Sets the Shape Selection color

    Declaration
    public Color ItemSelectionColor { get; set; }
    Property Value
    Type
    System.Drawing.Color

    ItemSelectionEndColor

    Gets or Sets the Shape Selection end color

    Declaration
    public Color ItemSelectionEndColor { get; set; }
    Property Value
    Type
    System.Drawing.Color

    ItemSelectionStartColor

    Gets or Sets the shape selection start color

    Declaration
    public Color ItemSelectionStartColor { get; set; }
    Property Value
    Type
    System.Drawing.Color

    ItemSize

    Gets or Sets the Shape size

    Declaration
    public Size ItemSize { get; set; }
    Property Value
    Type
    System.Drawing.Size

    MetroColor

    Gets or Sets the Shape Border weight

    Declaration
    public Color MetroColor { get; set; }
    Property Value
    Type
    System.Drawing.Color

    OfficeColorScheme

    Gets or Sets the Office 2007 ColorScheme.

    Declaration
    public OfficeColorSchemes OfficeColorScheme { get; set; }
    Property Value
    Type
    OfficeColorSchemes

    Orientation

    Gets or Sets Orientation

    Declaration
    public Orientationmode Orientation { get; set; }
    Property Value
    Type
    Orientationmode

    Precision

    Gets or Sets the Precision types

    Declaration
    public PrecisionMode Precision { get; set; }
    Property Value
    Type
    PrecisionMode

    ReadOnly

    Gets or Sets whether to enable readonly mode

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

    ResetButton

    Get or set for the ResetButton.

    Declaration
    public ResetButton ResetButton { get; set; }
    Property Value
    Type
    ResetButton

    ResetButtonSettings

    Declaration
    public CustomButtonRenderer ResetButtonSettings { get; }
    Property Value
    Type
    CustomButtonRenderer

    Shape

    Gets or Sets the Shapes to be drawn

    Declaration
    public Shapes Shape { get; set; }
    Property Value
    Type
    Shapes

    ShowTooltip

    Gets or Sets Whether to show the ToolTip.

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

    Spacing

    Gets or Sets the Spacing between the shapes

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

    Style

    Gets or Sets the value of Visual Style for the Rating Control.

    Declaration
    public RatingControl.Styles Style { get; set; }
    Property Value
    Type
    RatingControl.Styles

    ThemeStyle

    Gets or sets the RatingControlVisualStyle value used to customize the appearance of the RatingControl.

    Declaration
    public RatingControlVisualStyle ThemeStyle { get; set; }
    Property Value
    Type
    RatingControlVisualStyle
    Remarks

    This ThemeStyle settings will be applied only when the VisualStyleBased theme has been applied to the control.

    ToolTipSettings

    Get for the ToolTipSettings.

    Declaration
    public ToolTipInfo ToolTipSettings { get; }
    Property Value
    Type
    ToolTipInfo

    Value

    Gets or Sets the Rating value

    Declaration
    public float Value { get; set; }
    Property Value
    Type
    System.Single

    Methods

    CreateAccessibilityInstance()

    New instance for AccessibleObject

    Declaration
    protected override AccessibleObject CreateAccessibilityInstance()
    Returns
    Type Description
    System.Windows.Forms.AccessibleObject

    RatingControlAccessibleObject

    Dispose(Boolean)

    Clean up any resources being used.

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing

    true if managed resources should be disposed; otherwise, false.

    DrawCircle(Graphics, Rectangle, Int32)

    Draws the Circle shape

    Declaration
    protected void DrawCircle(Graphics g, Rectangle rect, int starAreaIndex)
    Parameters
    Type Name Description
    System.Drawing.Graphics g
    System.Drawing.Rectangle rect
    System.Int32 starAreaIndex

    DrawCircleOfficeStyle(Graphics, Rectangle, Int32)

    Draws the Circle shape

    Declaration
    protected void DrawCircleOfficeStyle(Graphics g, Rectangle rect, int starAreaIndex)
    Parameters
    Type Name Description
    System.Drawing.Graphics g
    System.Drawing.Rectangle rect
    System.Int32 starAreaIndex

    DrawCustomShapeOfficeStyle(Graphics, Rectangle, Int32)

    Draws the Custom Shape with the provided image

    Declaration
    protected void DrawCustomShapeOfficeStyle(Graphics g, Rectangle rect, int starAreaIndex)
    Parameters
    Type Name Description
    System.Drawing.Graphics g
    System.Drawing.Rectangle rect
    System.Int32 starAreaIndex

    DrawCustomShapes(Graphics, Rectangle, Int32)

    Draws the customshapes images

    Declaration
    protected void DrawCustomShapes(Graphics g, Rectangle rect, int starAreaIndex)
    Parameters
    Type Name Description
    System.Drawing.Graphics g
    System.Drawing.Rectangle rect
    System.Int32 starAreaIndex

    DrawHeart(Graphics, Rectangle, Int32)

    Draws the heart shape

    Declaration
    protected void DrawHeart(Graphics g, Rectangle rect, int starAreaIndex)
    Parameters
    Type Name Description
    System.Drawing.Graphics g
    System.Drawing.Rectangle rect
    System.Int32 starAreaIndex

    DrawHeartOfficeStyle(Graphics, Rectangle, Int32)

    Draws the heart shape

    Declaration
    protected void DrawHeartOfficeStyle(Graphics g, Rectangle rect, int starAreaIndex)
    Parameters
    Type Name Description
    System.Drawing.Graphics g
    System.Drawing.Rectangle rect
    System.Int32 starAreaIndex

    DrawShape(Graphics, Rectangle, Int32)

    Draws the basic shapes with provided points

    Declaration
    protected void DrawShape(Graphics g, Rectangle rect, int starAreaIndex)
    Parameters
    Type Name Description
    System.Drawing.Graphics g
    System.Drawing.Rectangle rect
    System.Int32 starAreaIndex

    DrawShapeOfficeStyle(Graphics, Rectangle, Int32)

    Draws the basic shapes with provided points

    Declaration
    protected void DrawShapeOfficeStyle(Graphics g, Rectangle rect, int starAreaIndex)
    Parameters
    Type Name Description
    System.Drawing.Graphics g
    System.Drawing.Rectangle rect
    System.Int32 starAreaIndex

    GetControlName(String)

    Helps to apply the ControlName settings in control

    Declaration
    public override string GetControlName(string controlName)
    Parameters
    Type Name Description
    System.String controlName
    Returns
    Type
    System.String
    Overrides
    BaseControl.GetControlName(String)

    OnCanApplyThemeChanged(Boolean)

    Helps to apply the CanApplyTheme settings in control

    Declaration
    public override void OnCanApplyThemeChanged(bool canApplyTheme)
    Parameters
    Type Name Description
    System.Boolean canApplyTheme
    Overrides
    BaseControl.OnCanApplyThemeChanged(Boolean)

    OnCanOverrideStyleChanged(Boolean)

    Helps to apply the CanOverriderStyle settings in control

    Declaration
    public override void OnCanOverrideStyleChanged(bool canOverriderStyle)
    Parameters
    Type Name Description
    System.Boolean canOverriderStyle
    Overrides
    BaseControl.OnCanOverrideStyleChanged(Boolean)

    OnClick(EventArgs)

    Control's onClick has been overrided to calculate the selected star and selected half star

    Declaration
    protected override void OnClick(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    OnDrawCircle(Graphics, Rectangle, Int32)

    Draws the Circle shape

    Declaration
    protected void OnDrawCircle(Graphics g, Rectangle rect, int starAreaIndex)
    Parameters
    Type Name Description
    System.Drawing.Graphics g
    System.Drawing.Rectangle rect
    System.Int32 starAreaIndex

    OnDrawCustomShapes(Graphics, Rectangle, Int32)

    Draws the customshapes images

    Declaration
    protected void OnDrawCustomShapes(Graphics g, Rectangle rect, int starAreaIndex)
    Parameters
    Type Name Description
    System.Drawing.Graphics g
    System.Drawing.Rectangle rect
    System.Int32 starAreaIndex

    OnDrawHeart(Graphics, Rectangle, Int32)

    Draws the heart shape

    Declaration
    protected void OnDrawHeart(Graphics g, Rectangle rect, int starAreaIndex)
    Parameters
    Type Name Description
    System.Drawing.Graphics g
    System.Drawing.Rectangle rect
    System.Int32 starAreaIndex

    OnDrawShape(Graphics, Rectangle, Int32)

    Draws the basic shapes with provided points

    Declaration
    protected void OnDrawShape(Graphics g, Rectangle rect, int starAreaIndex)
    Parameters
    Type Name Description
    System.Drawing.Graphics g
    System.Drawing.Rectangle rect
    System.Int32 starAreaIndex

    OnMouseDown(MouseEventArgs)

    OnMouseDown method to calculated the number of selecting shapes

    Declaration
    protected override void OnMouseDown(MouseEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.MouseEventArgs e

    OnMouseEnter(EventArgs)

    Mouse enter method has been overrided

    Declaration
    protected override void OnMouseEnter(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    OnMouseLeave(EventArgs)

    Mouse leave method has been overrided

    Declaration
    protected override void OnMouseLeave(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    OnMouseMove(MouseEventArgs)

    Overrided mouse move method

    Declaration
    protected override void OnMouseMove(MouseEventArgs args)
    Parameters
    Type Name Description
    System.Windows.Forms.MouseEventArgs args

    OnMouseUp(MouseEventArgs)

    Mouse up method has been overrided

    Declaration
    protected override void OnMouseUp(MouseEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.MouseEventArgs e

    OnPaint(PaintEventArgs)

    Overrides the Control's Paint method

    Declaration
    protected override void OnPaint(PaintEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.PaintEventArgs e

    OnSizeChanged(EventArgs)

    Overrides the Size changed method

    Declaration
    protected override void OnSizeChanged(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    OnThemeNameChanged(String)

    Helps to apply the ThemeName settings in control

    Declaration
    public override void OnThemeNameChanged(string themeName)
    Parameters
    Type Name Description
    System.String themeName

    ThemeName

    Overrides
    BaseControl.OnThemeNameChanged(String)

    OnValueChanged(Single)

    Declaration
    protected void OnValueChanged(float value)
    Parameters
    Type Name Description
    System.Single value

    OnValueChanging(Single, ToolTipInfo)

    Declaration
    protected void OnValueChanging(float value, ToolTipInfo tooltip)
    Parameters
    Type Name Description
    System.Single value
    ToolTipInfo tooltip

    Reset()

    Reset method that resets the value

    Declaration
    public void Reset()

    Events

    QueryShapeInfo

    Declaration
    public event QueryShapeInfoHandler QueryShapeInfo
    Event Type
    Type
    QueryShapeInfoHandler

    ValueChanged

    Declaration
    public event RatingValueChangedEventHandler ValueChanged
    Event Type
    Type
    RatingValueChangedEventHandler

    ValueChanging

    Declaration
    public event ValueChangingEventHandler ValueChanging
    Event Type
    Type
    ValueChangingEventHandler

    Implements

    IThemeProvider
    IVisualStyle
    System.IDisposable
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved