)
We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to change the size of the ToolStripButton image in the ToolStripEx?

Platform: WinForms |
Control: RibbonControlAdv |
Published Date: August 24, 2015 |
Last Revised Date: February 4, 2020

Change the size of ToolStripButton

You can change the size of the ToolStripButton image by using the property, ImageScalingSize in the ToolStripEx. It helps to specify the image size used in the ToolStripEx. In order to specify the ImageScalingSize for ToolStripEx, the ImageScaling property should be specified as SizeToFit in the ToolStripButton.

C#

//Changes the size of the ToolStrip botton image
this.toolStripEx1.ImageScalingSize = new Size(60, 60);
//Disables the image scaling for a particular item
this.toolStripButton2.ImageScaling = ToolStripItemImageScaling.None;

VB

'Changes the size of the ToolStrip botton image
Me.toolStripEx1.ImageScalingSize = New Size(60, 60)
'Disables the image scaling for a particular item
Me.toolStripButton2.ImageScaling = ToolStripItemImageScaling.None

 

Note:

1. The Image scaling size is specified as pixels.

2. The default value of the ImageScaling size is 16 x 16 pixels.

3. The default value of the ImageScaling property is SizeToFit.

 

Before specifying the ImageScaling size

Figure 1: Before specifying the ImageScaling size

After specifying the ImageScaling size

Figure 2: After specifying the ImageScaling size

Image scaling is disabled for ToolStripButton

Figure 3: Image scaling is disabled for ToolStripButton2

Samples:

C#: ToolStripEx_ImageScaling_C#

VB: ToolStripEx_ImageScaling_VB

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon