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.
Unfortunately, activation email could not send to your email. Please try again.

Icon for Ribbon Tab

Thread ID:

Created:

Updated:

Platform:

Replies:

99597 May 31,2011 07:46 AM Jun 15,2011 02:12 AM WPF 1
loading
Tags: Tools
soober
Asked On May 31, 2011 07:46 AM

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

Regards


Sakthi Kumar A [Syncfusion]
Replied On June 15, 2011 02:12 AM

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

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

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.

;