I would like to suppress the ribbon tab header as i am having only single tab having 5 ribbon group.the tab header having it size unnecessary. Please assist.
Hi Gaurav,
Thank you for contacting Infragistics Developer Support.
You can remove the TabHeaders if you set the TabItemAreaDisplayStyle to either Hidden or HideTabs. You also need to set the Office2007UICompatibility to false. To do those things use code like:
ultraToolbarsManager1.Office2007UICompatibility = false; ultraToolbarsManager1.Ribbon.TabItemAreaDisplayStyle = TabItemAreaDisplayStyle.HideTabs;
ultraToolbarsManager1.Ribbon.TabItemAreaDisplayStyle = TabItemAreaDisplayStyle.HideTabs;
Please let me know if you have any additional questions.
Hi, Dimitar,
Thanks for the response. I am unable to find the property
ultraToolbarsManager1.Ribbon.TabItemAreaDisplayStyle. In which version i can find it.Please assist.
Thank you for the reply.
It’s a new feature added in 14.1. For more information you can visit this page:
http://help.infragistics.com/Doc/WinForms/2014.1/CLR4.0/?page=Whats_New_in_2014_Volume_1.html
If you don’t want to upgrade to 14.1 you can use creation filter to remove this. It basically achieves the same result as setting this property. You simply need to create a class which inherits IUIElementCreationFilter interface and assign an object of this class to the CreationFilter property of the UltraToolbarsManager. Here is how the class should look like:
class CustomCreationFilter : IUIElementCreationFilter { public void AfterCreateChildElements(UIElement parent){} public bool BeforeCreateChildElements(UIElement parent) { if (parent is RibbonTabItemUIElement || parent is TabHighlightUIElement) { parent.Parent.ChildElements.Remove(parent); return true; } return false; } }
{
public void AfterCreateChildElements(UIElement parent){}
public bool BeforeCreateChildElements(UIElement parent)
if (parent is RibbonTabItemUIElement || parent is TabHighlightUIElement)
parent.Parent.ChildElements.Remove(parent);
return true;
}
return false;
Hi Dimitar,
Thanks for the help.It works fine. But one more problem with the above customization there is space remains after tab header is removed. what i need is the ribbon should stick to form top. I have pasted the image below. Please assist.
Please to know if this is possible with the ribbon tab customization a space left for the control just removed. what i need is the ribbon should stick to form top. I have pasted the image below. Please assist.