I tried to get the following but did not find the right set of properties to modify.
I have a Windows forms application with an UltraToolbarsManager which displays a Ribbon with all its RibbonTabs collapsed. When the user clicks on a tab caption and that tab is displayed, I would like to display that tab in a semi-transparent way letting the form show through the tab transparency.
First, is it possible to do that?Second, how can I do that?
Thanks
There is currently no property to do this. However, you could use a creation filter to accomplish this. Add the following class to your project and in the constructor of your Form, create a new instance of it and assign it to the CreationFilter property of your UltraToolbarsManager:
public class OpacityCreationFilter : IUIElementCreationFilter{ private UltraToolbarsManager manager;
public OpacityCreationFilter( UltraToolbarsManager manager ) { this.manager = manager; }
void IUIElementCreationFilter.AfterCreateChildElements( UIElement parent ) { }
bool IUIElementCreationFilter.BeforeCreateChildElements( UIElement parent ) { if ( parent is RibbonTabPageUIElement && this.manager.Ribbon.IsMinimized ) { Form form = parent.Control.FindForm();
const float opacity = 0.6f;
if ( form != null && form.Opacity != opacity ) form.Opacity = opacity; }
return false; }}
Thanks, that worked perfectly