I am converting my application from FlashBuilder to a c# Winform and I would like as shown in the attached gif. Essentially I have an image for the non-selected , one for the hover and one for the selection (a different colour depending on what level was selected).
thanks in advance.
4 Answers, 1 is accepted
Thank you for writing.
I can suggest using the standard StarShapes which are supported by our framework. Additional information is available here: https://docs.telerik.com/devtools/winforms/telerik-presentation-framework/shapes/star-shape. As I understand you would like each of the radio buttons to have an individual fill color when it gets selected. For such a scenario you can consider applying the settings for each of the buttons at run-time. For example like this:
If you would prefer to use images you can achieve it this way:
Please also note that with the approach using images you will also need to manually handle the image for the Checked toggle state. A suitable place to do this is the handler of the ToggleStateChanged event.
I hope this helps. Let me know if you need further assistance.
I have no problem using the standard shapes, but they are too small (see the attached image - left is original and right Telerik). Can the shapes be larger?
I tried using my own png file from the Resources and it shows a square with the star shape in it, not just the star image itself. Maybe I did something wrong??
Thank you for writing back.
The standard star shape is predefined and it cannot be altered. If you are to use the shapes you can consider creating your own shape using the Shape Editor tool: https://docs.telerik.com/devtools/winforms/tools/shapeeditor/shapeeditor.
If you decide to go with the images you can set the DrawBorder property of the RadRadioMark to false. Please check my code snippet below:
I am also attaching a short video showing the result on my end.
I hope this helps. Let me know if you have other questions.