Hi Telerik team,
I can't find documentation on how to scale or size the rating control. For example, if I put the rating control in a Stack panel the control gets clipped on certain height values, mostly less than 15 pixels. Looks like the controls height is fixed size? Any thoughts.
Thanks, kind regards,
6 Answers, 1 is accepted
The control is scaled according the value of FontSize. You can decrease its value if you need the control to fit in a small area.
Have you tried setting the FontSize to even smaller value?
I tried to set it to 4 and the control gets smaller. You can see the code and the results I get on our side on the following picture:
If further lowering the FontSize property does not take affect on your side I would like to ask you to try to reproduce the same behavior in a small repro project and send it over along with exact steps to reproduce the issue on our side. This is the only way to investigate the reasons behind and further assist you on your way.
Pavel R. Pavlov
using a small test program like yours, I was able to get the same results as you from the screenshot above. But if I start to use a data template/content template for styling the control like in the following code, the size will not be affected at all:
Looks like I have to change both the ContentTemplates, but I don't know how.
Thanks for your help.
Thank you for the additional details. The behavior you see is caused by the usage of SymbolIcon. The symbol's size is fixed, hence the control appearing clipped. There are several approaches here:
- You can use ScaleTransform to alter the size of the SymbolIcon
- You can use a TextBlock with Text="" instead, then you can set its FontSize.
- You can wrap the SymbolIcon control within a ViewBox and set ViewBox's dimensions.
thank you very much for your help. I went to used a ViewBox as you advised and everything is working well know!