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

How do I resize the Image of a RadButton at runtime?

1 Answer 360 Views
Buttons, RadioButton, CheckBox, etc
This is a migrated thread and some comments may be shown as answers.
Kevin
Top achievements
Rank 1
Kevin asked on 03 Jul 2015, 11:00 AM

I have a from with a number of RadButton elements each of which contains a square Image.

When the application is maximized I want all of the images to remain square when the elements are resized.

Can I re-adjust the sizes after the RadButton elements are resized?

If not, can I lock the aspect ratio of the Images so that resizing the RadButton elements does not distort them?

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 07 Jul 2015, 09:23 AM
Hello Kevin,

Thank you for writing.

The image scaling is controlled with the following property:
radButton1.ButtonElement.ImagePrimitive.ImageScaling

Another property that controls the image layout is:
radButton1.ButtonElement.ImagePrimitive.ImageLayout = ImageLayout.Stretch;

More information on the ImagePrimitive can be found here: http://www.telerik.com/help/winforms/tpf-primitives-imageprimitive.html.

If you still experience issues, please provide information how are you setting the image and perhaps the image itself and I will do my best to assist you.

Regards,
Stefan
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Buttons, RadioButton, CheckBox, etc
Asked by
Kevin
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or