This is a migrated thread and some comments may be shown as answers.

A little curious

2 Answers 39 Views
Rating
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Matthew
Top achievements
Rank 1
Matthew asked on 20 Nov 2013, 12:25 PM
I'm trying to set rectangles for the telerikInput:RadRating.ItemShapeGeometry of the control and they're working just fine BUT! like in the example below I have to set values for the rect property. It doesn't matter what I put in there for values, they're mostly arbitrary, there has be be something there; if left blank the rectangles don't show. The control itself only honors whats in the ItemShapeWidth/Height for setting values of said rectangles so those values don't matter.

It's not really a bug, but seems odd and feels like it might come back to bite me one day. Any explanations?

<telerikInput:RadRating.ItemShapeGeometry>
    <RectangleGeometry Rect="0,0,12,12" />
</telerikInput:RadRating.ItemShapeGeometry>

2 Answers, 1 is accepted

Sort by
0
Todor
Telerik team
answered on 22 Nov 2013, 12:43 PM
Hello Matthew,

Thank you for writing.

You have correctly identified that ItemShapeWidth/ItemShapeHeight values (even the default ones) override the size of the geometry that you have set. The reason for this is that when the control is initialized, we create a Path object that we use to define the shapes of the different rating items and these objects need size in order to be visible. Since not all types of Geometry objects (see PathGeometry) have their size defined as it is in RectangleGeometry we always use the ItemShapeWidth and ItemShapeHeight's values.

Let me know if you have other questions.

Regards,
Todor
Telerik
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
0
Matthew
Top achievements
Rank 1
answered on 22 Nov 2013, 05:54 PM
No, that answers it. Like I said I just wanted to make sure that they were truly arbitrary like I thought they were. There was the possibility of me missing some important part of customizing the control and later finding out I had some fixing to do. :-)

Thanks for the reply Todor.
Tags
Rating
Asked by
Matthew
Top achievements
Rank 1
Answers by
Todor
Telerik team
Matthew
Top achievements
Rank 1
Share this question
or