Articles in this section
Category / Section

How to change ToolStripEx image size in WinForms RibbonControlAdv?

3 mins read

Change the image size

The image size of the ToolStripEx items in RibbonControlAdv can be changed by using ToolStripEx AutoSize and Image Scaling property as shown in the following code example.

C#

private void button1_Click(object sender, EventArgs e)
{
    //To Disable Auto Size and Image Scaling
    this.toolStripButton1.AutoSize = false;
    this.toolStripButton1.ImageScaling = ToolStripItemImageScaling.None;
    //To Set user defined Size
    this.toolStripButton1.Size = new Size(35, 35);
}

VB

Private Sub button1_Click(sender As Object, e As EventArgs)
    ‘ To Disable Auto Size and Image Scaling
    Me.toolStripButton1.AutoSize = False
    Me.toolStripButton1.ImageScaling = ToolStripItemImageScaling.None
    ‘ To Set user defined Size
    Me.toolStripButton1.Size = New Size(35, 35)
End Sub

Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ImageSize111407823.zip

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied