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

How to set the CommandBarButton default size

1 Answer 261 Views
CommandBar
This is a migrated thread and some comments may be shown as answers.
Giovanni
Top achievements
Rank 1
Iron
Iron
Iron
Giovanni asked on 29 Oct 2012, 03:48 PM
Hi,
I tried to create a commandbar with only CommandBarButton elements, each one displayed as image only.
How can I set by default the size to contains 32x32 images instead of 16x16?

Thank you

1 Answer, 1 is accepted

Sort by
0
Anton
Telerik team
answered on 01 Nov 2012, 11:13 AM
Hi Giovanni,

If I understand correctly, you want to show image with size 32x32 in CommandBarButton element. If so, here is how you can do that: 
1. Use image with size 32x32.
2. Set the MinSize if you want to have space between image and borders of the button.

this.commandBarButton3.Image = global::CommandBarButtonDefaultSize.Properties.Resources.Button_Next_icon32x32;
this.commandBarButton3.MinSize = new System.Drawing.Size(40, 40);

Hope this helps. Feel free to ask if you have any additional questions.

Greetings,
Anton
the Telerik team
Q3’11 of RadControls for WinForms is available for download (see what's new). Get it today.
Tags
CommandBar
Asked by
Giovanni
Top achievements
Rank 1
Iron
Iron
Iron
Answers by
Anton
Telerik team
Share this question
or