Hi,we are restyling our ribbon control from 2007 style to 2013 view style where the round application menu button in 2007 style replaced with square application menu button.I am facing issue when I set the image to new 2013 menu button as it occupy left side of the application menu button.My requirement is to place the application icon image to the exact center of the 2013 application menu button.Is there anyway to do the same?any help will be appreciated.
Hello Sijo,
To force the image to show in the middle of the button you need to set its ImageHAlign property, of FileMenuButtonAppearance, to Center like this:
this.ultraToolbarsManager1.Ribbon.FileMenuButtonAppearance.ImageHAlign = Infragistics.Win.HAlign.Center;
Keep in mind this may overlap the text of file menu button and the image. If you need to hide the text of the button you may set FileMenuButtonCaptionVisible to false like this:
this.ultraToolbarsManager1.Ribbon.FileMenuButtonCaptionVisible = false;
Please let me know if this solves your issue, or if you have any additional questions.
Hi Milko,Thank you for your response,but I tried this in the designer,I made the caption hide too,but the image remains in the left side itself.
Hi Sijo,
Thank you for your feedback.
Yes, you are correct. Even if you set FileMenuButtonCaptionVisible to false, UltraToolbarsManager reserves space for the caption and the image remains at the left side of the button. However, you can work around this in two easy ways:
this.ultraToolbarsManager1.Ribbon.FileMenuButtonCaption = " ";this.ultraToolbarsManager1.Ribbon.FileMenuButtonCaptionVisible = true;
Attached is a small sample showing how to implement both these work around.
Please let me know if any additional questions arise.