Hi,
Does any one know how to give a style for the RibbonTab text.
regards,
Ceaser
Ceaser,
You can style the RibbonTab text by setting FontData in the TabAreaAppearance object. There are two different ways to accomplish this. If you want to style all tabs the same way, you can use code similar to:
this.ultraToolbarsManager1.Ribbon.TabAreaAppearance.FontData.Bold = Infragistics.Win.DefaultableBoolean.False;
If you want to style a single tab, you can use code similar to:
this.ultraToolbarsManager1.Ribbon.Tabs[0].Settings.TabItemAppearance.FontData.Italic = Infragistics.Win.DefaultableBoolean.True;
Hope this helps,
~Kim~
Hi Kim,
Thanks for the reply.
Actually I am not asking about the ordinary type of formatting (bold, italic, underline etc).
I need an embossed style, please see the attachment for more clarity
There are no properties that will show the RibbonTab text in an embossed style. You can, however, create a DrawFilter, handle the painting of the correct TextUIElement, and draw the text yourself using one of the overloads of the DrawString() method off of the Graphics object.
I greatly appreciate your earliest response.
I have tried with DrawFilter but it is not working properly.
I am attaching the code which I have tried, please check it and can you tell where I am going wrong.
Regards,
You were on the right track. I've modified the sample and have uploaded it here. I've also cleaned it up a little- I've moved the DrawFilter code into its own class so it's a little more readable. The main difference in this modified version is that rather than using the DrawString() method off of the UIElementDrawParams object, I'm using the method off of the UIElementDrawParams.Graphic object. In order to get the correct font information, I grabbed it from the drawParams object itself. I've modified the iOffset variable to 2 from 5, but that can be changed based on your preference.
Thanks for the help, especially for the minimal time taken for the solution.