Telerik ASP。网络核心评级allows users to rate items with a certain number of stars or any other preferred shape, such as hearts, circles and more. The component features Selection, Precision, Labels, Tooltip and Templates settings for full customization. It lets users use keyboard navigation with enhanced accessibility to give their vote and supports RTL rendering.
评级或星级的选择可以通过两种不同的方式配置。您可以允许所有的星星都被选中,或者只高亮选中的星星。
看到ASP。网络核心评级选择demo
当谈到评价产品时,用户并不总是设定一个整数,这就是为什么Telerik ASP。NET核心评级有增加一半的选项。通过修改precision属性,您可以允许用户给出4.5/5的评级,或者将评级约束为一个整数值。
Rating组件使您能够自定义其外观以满足您的设计需求。默认情况下,每个评分项都呈现为星形图标。要修改默认图标,可以使用ItemTemplate、SelectedTemplate和HoveredTemplate属性。要查看示例模板,请访问这个演示页面。
当您需要显示平均值时,组件的值可以是一个精确到单个小数点的实数(例如0.4、0.5、3.9等)。为了显示满/半满项目,在呈现时将此数字四舍五入。值本身显示在控件的标签中。
Telerik UI for ASP。网络核心provides you with two ways to declare UI components—by using either HTML or Tag helpers. You can use them to help you easily configure the Rating component.
用于ASP的Telerik UI。网络核心评级is one of the many components in the suite with out-of-the-box support for keyboard navigation. Users can easily navigate the component using the arrow keys to cast their vote. The component is compliant with Section 508 and WCAG guidelines.
查看ASP。网络核心评级Keyboard Navigation demo
评级组件有20多个内置主题。您可以很容易地自定义任何开箱即用的主题,只需几行CSS或创建新的主题,以匹配您的颜色和品牌与Telerik SASS ThemeBuilder应用程序。