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. Image for the cookie policy date

Icon for Ribbon Tab

1. Is there any possibility to add icon to the ribbon tab ?
2. Can we change the size RibbonBar Header="syncfusion" and background ?

Regards


1 Reply

SK Sakthi Kumar A Syncfusion Team June 15, 2011 06:12 AM UTC

Hi Soober,

Sorry for the Inconvenience caused.

We have created the sample for adding the Icon to RibbonTab and setting the Background to RibbonBar of Ribbon control. In the sample we have used Ivalue converter for adding the Icon to Ribbon Tab. In the converter class we have converted the Tag property string value in to bitmap image and we assigned to Tag property of RibbonTab.

Code Snippet :


Tag="/SimpleRibbon;component/Image/SmallHome.png">

public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)

{

Image i = new Image();

i.Source = new BitmapImage(new Uri((string)value,UriKind.RelativeOrAbsolute));

return i;

}

For applying Background to RibbonBar :

We can apply the Background color directly to RibbonBar, in that case when mouse is over on the RibbonBar, background color will be disappeared and default color got applied. So we modified DefaultRibbonBarStyle control template's Background property.

Please refer the code snippet :






Please refer the sample under the following location.


Please let us know if you have any queries.

Regards,
Sakthi



SimpleRibbon_ccfc8187.zip

Loader.
Live Chat Icon For mobile
Up arrow icon