

Also it is very important that from where your components are derived. Here the Rating control is derived from ItemsControl, each ItemContainer will be replaced by a star symbol which is a ContentControl. This is achieved by overriding the GetContainerForItemOverride method.
- protected override DependencyObject GetContainerForItemOverride()
- {
- return new RatingItem();
- }
Rating control exposes RatingItemLimit, RatingItemBackground, RatingItemHighlightColor, RatingItemMouseDownColor and RatingValue properties to interact with the control.
- <controls:Rating Width="250"
- eight="20"
- RatingItemLimit="10"
- RaingItemBackground="Red"
- RatingItemHighlightColor="Green"
- RatingItemMouseDownColor="Black"
- RatingValue="2.6">
- </controls:Rating>


Ittyab RehmanPosted Apr 27, 2021, 12:38 AM EDT
After hours of RND finally got what I want. Thank you for sharing this example. Helped a lot