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

Autosize radButton to text

4 Answers 240 Views
Buttons, RadioButton, CheckBox, etc
This is a migrated thread and some comments may be shown as answers.
tyler thompson
Top achievements
Rank 1
tyler thompson asked on 30 Jan 2009, 05:16 PM
Hello,  I apologize if I am missing something obvious here but, should the radButton be resizing to the text it contains?  If I take a standard button, put long text into it and set autosize = true the button will expand to the size of the text.  Can I do this with the radButton? 

Thank you,
Tyler

4 Answers, 1 is accepted

Sort by
0
Victor
Telerik team
answered on 02 Feb 2009, 03:52 PM
Hi tyler thompson,
 
Thank you for writing.

You are not missing anything. You have to set these two properties in order to achieve the automatic resize:
 
radButton1.AutoSize = true;  
radButton1.RootElement.StretchHorizontally = false
 
I hope this is what you are looking for. Please write again if something else troubles you.

Best wishes,
Victor
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
deftb
Top achievements
Rank 1
answered on 20 Apr 2020, 10:38 AM

Hi Victor. How would I set those properties in Xaml?

 

<RadButton Autosize....

 

but it doesn't recognize it (I have added the TelerikInput reference, so it does recognize Radbutton) 

0
deftb
Top achievements
Rank 1
answered on 20 Apr 2020, 10:48 AM
Didn't realise how old that post was LOL. It seems that the RadButton automatically resizes as I've just tried without any settings
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 21 Apr 2020, 04:50 AM

Hi, David, 

I would like to note that this forum is related to the Telerik UI for WinForms suite. However, it seems that you are using WPF.

I would kindly ask you to post your technical question in the relevant forum: https://www.telerik.com/forums Thank you for your understanding.

If you have any further questions regarding the Telerik UI for WinForms suite, please let me know.

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
Buttons, RadioButton, CheckBox, etc
Asked by
tyler thompson
Top achievements
Rank 1
Answers by
Victor
Telerik team
deftb
Top achievements
Rank 1
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or