Articles in this section
Category / Section

How to set custom image in the WinForms RibbonControlAdv header?

1 min read

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

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