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

ToolBarItemLook in SyncFusion 6.2.0.40

Thread ID:

Created:

Updated:

Platform:

Replies:

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

Hi,

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";

toolbar1.ItemLooks.Add(lookcommon);



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

http://websamples.syncfusion.com/samples/Tools.Web/6.2.0.40/Tools_ASP_toolbaritemlooks/main.htm


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

Regards,
Janagan.



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.

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

;