)
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 set custom image in the WinForms RibbonControlAdv header?

Platform: WinForms |
Control: RibbonControlAdv |
Published Date: September 4, 2015 |
Last Revised Date: January 8, 2020

Custom image of ribbon header

You can render the custom image in the RibbonControlAdv Header. To set the custom header image in the RibbonControlAdv, do the following,

  1. Specify the RibbonHeaderImage property as the RibbonHeaderImage.Custom.
  2. Assign the required image to the RibbonControlAdv by using the CustomRibbonHeaderImage property.

C#

//Sets the custom image of the Ribbon Header.
this.ribbonControlAdv1.RibbonHeaderImage = RibbonHeaderImage.Custom;
//Assigns image in the Ribbon Header.
this.ribbonControlAdv1.CustomRibbonHeaderImage = imageListAdv1.Images[0];

VB

'Sets the custom image of the Ribbon Header.
Me.ribbonControlAdv1.RibbonHeaderImage = RibbonHeaderImage.Custom
'Assigns image in the Ribbon Header.
Me.ribbonControlAdv1.CustomRibbonHeaderImage = imageListAdv1.Images(0)

 

Note:

The default value of the RibbonHeader image is specified as RibbonHeaderImage.None. So, specify the required image.

 

Before applying the custom header image in RibbonControlAdv

Figure 1: Before applying the custom header image in RibbonControlAdv

After applying the custom header image in RibbonControlAdv

Figure 2: After applying the custom header image in RibbonControlAdv

Before applying the custom header image in BackstageView

Figure 3: Before applying the custom header image in BackStageView

After applying the custom header image in BackStageView

Figure 4: After applying the custom header image in BackStageView

Samples:

C#: RibbonHeader_CustomImage_C#

VB: RibbonHeader_CustomImage_VB

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
ADD COMMENT
You must log in to leave a comment
Comments
William Rodrigues
Aug 05, 2018

How to add RibboneaderImagem collection in a ToolStripCheckBox?

Reply
Senthil Kumaran Rajan [Syncfusion]
Aug 06, 2018

Hi William, 

 
Thank you for using Syncfusion products. 
 
We have prepared the sample for the reported requirement in RibbonControlAdv. Please make use of the below code example. 
 
Code Example[C#]: 
 
private void Form1_Load(object sender, EventArgs e) 
        { 
            // Add the RibbonHeaderImage items in ToolStripComboBox 
            foreach (RibbonHeaderImage item in Enum.GetValues(typeof(RibbonHeaderImage))) 
            { 
                this.toolStripComboBox1.Items.Add(item); 
            } 
        } 
 
        private void toolStripComboBox1_SelectedIndexChanged(object sender, EventArgs e) 
        { 
            if (this.toolStripComboBox1.SelectedItem != null) 
            { 
                this.ribbonControlAdv1.RibbonHeaderImage = (RibbonHeaderImage)Enum.Parse(typeof(RibbonHeaderImage),this.toolStripComboBox1.SelectedItem.ToString()); 
            } 
        } 
 
 
Please download the sample from below link. 
 
 
Regards, 
Senthil
Reply

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