A little curious

3 posts, 0 answers
  1. Matthew
    Matthew avatar
    32 posts
    Member since:
    Oct 2011

    Posted 20 Nov 2013 Link to this post

    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. Todor
    Admin
    Todor avatar
    778 posts

    Posted 22 Nov 2013 Link to this post

    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.
  3. DevCraft banner
  4. Matthew
    Matthew avatar
    32 posts
    Member since:
    Oct 2011

    Posted 22 Nov 2013 Link to this post

    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.
Back to Top