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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

ToolBarItemLook in SyncFusion

Thread ID:





73754 May 16,2008 02:59 PM UTC May 22,2008 02:31 PM UTC ASP.NET Web Forms (Classic) 1
Tags: Tools
Administrator [Syncfusion]
Asked On May 16, 2008 02:59 PM UTC


I am trying to apply styles to ToolBar in SyncFusion. I can see that ToolBarItemLook class needs to be used. But I am unable to add the object to ToolBar as I do not get a property ItemLooks. Am I missing something. Or is it not supported in 6.2? If not, is there a work-around for appling css styles. Please help asap.

Code :

xpToolBar1 = new Syncfusion.Windows.Forms.Tools.XPMenus.XPToolBar();

ToolBarItemLook lookcommon = new ToolBarItemLook();
lookcommon.StateDataActive.ItemCSSClass = "customBarItemActive";
lookcommon.StateDataActive.TextCellCSSClass = "customBarItemActive";
lookcommon.StateDataActive.TextCSSClass = "customBarItemActive";

xpToolBar1.ItemLooks.Add(lookcommon); -> This is what I want to do, I get error as ItemLooks is not a property of xpToorBar1.

Janagan [Syncfusion]
Replied On May 22, 2008 02:31 PM UTC

Hi Preetha,

Thanks for your interest in Syncfusion products.

You can apply styles to the toolbar using ToolBarItemLook as mentioned in the code below:

ToolBarItemLook lookcommon = new ToolBarItemLook();
lookcommon.ID = "lookcommon";

lookcommon.StateDataActive.ItemCSSClass = "Hover_ItemCSS";
lookcommon.StateDataActive.ImageContainerCSSClass = "Def_ImgCont";
lookcommon.StateDataActive.ImageCSSClass = "Def_Img";
lookcommon.StateDataActive.TextCellCSSClass = "Def_TextCell";
lookcommon.StateDataActive.TextCSSClass = "Def_TextCont";
lookcommon.StateDataActive.ImageCellCSSClass = "Def_ImgCell";

lookcommon.StateDataDefault.ItemCSSClass = "Def_ItemCSS";
lookcommon.StateDataDefault.ImageContainerCSSClass = "Def_ImgCont";
lookcommon.StateDataDefault.ImageCSSClass = "Def_Img";
lookcommon.StateDataDefault.ImageCellCSSClass = "Def_ImgCell";
lookcommon.StateDataDefault.TextCellCSSClass = "Def_TextCell";
lookcommon.StateDataDefault.TextCSSClass = "Def_TextCont";

lookcommon.StateDataHover.ItemCSSClass = "Hover_ItemCSS";
lookcommon.StateDataHover.ImageContainerCSSClass = "Def_ImgCont";
lookcommon.StateDataHover.ImageCSSClass = "Def_Img";
lookcommon.StateDataHover.ImageCellCSSClass = "Def_ImgCell";
lookcommon.StateDataHover.TextCellCSSClass = "Def_TextCell";
lookcommon.StateDataHover.TextCSSClass = "Def_TextCont";

lookcommon.StateDataPushed.ItemCSSClass = "Active_ItemCSS";
lookcommon.StateDataPushed.ImageContainerCSSClass = "Def_ImgCont";
lookcommon.StateDataPushed.ImageCSSClass = "Def_Img";
lookcommon.StateDataPushed.TextCellCSSClass = "Def_TextCell";
lookcommon.StateDataPushed.TextCSSClass = "Def_TextCont";
lookcommon.StateDataPushed.ImageCellCSSClass = "Def_ImgCell";


Please refer the sample in the link below which illustrates the above:


Please try running the sample and let me know if this helps.



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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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